A spokesperson for National Resistance Forces, a group loyal to Ahmad Massoud, says fighting occurred on the western entrance to the valley where the Taliban attacked NRF positions.
Taliban forces have clashed with militia fighters in the Panjshir valley north of the Afghan capital Kabul, with at least seven killed, two members of the main anti-Taliban opposition group said.
Fahim Dashti, a spokesman for the National Resistance Forces, a group loyal to local leader Ahmad Massoud, said the fighting occurred on Monday night on the western entrance to the valley where the Taliban attacked NRF positions.
He said the attack, which may have been a probe to test the valley's defences, was repulsed with eight Taliban killed and a similar number wounded, while two members of the NRF forces were wounded.
"Last night, the Taliban attacked Panjshir, but were defeated with 7 dead and several wounded," Bismillah Mohammadi, a member of the resistance movement who served as a minister under exiled President Ashraf Ghani, said in a tweet.
"They retreated with heavy casualties."
Since the fall of Kabul on August 15, the Panjshir has been the only province to hold out against the Taliban, although there has also been fighting in neighbouring Baghlan province between Taliban and local militia forces.
It was not immediately possible to reach a Taliban spokesman for comment.
Calls for negotiated settlement
Massoud, son of the former anti-Soviet mujahideen commander Ahmad Shah Massoud, has established himself in the Panjshir valley with a force of several thousand, made up of local militias and remnants of army and special forces units.
He has called for a negotiated settlement with the Taliban but has said his forces will resist if their province in the narrow and mountainous valley is attacked.
A significant force of Taliban fighters has been moved to the area but the two sides have so far been engaged in negotiations and have avoided fighting.
Celebratory gunfire resounded across Kabul on Tuesday as Taliban fighters took control of the airport after the withdrawal of the last US troops, marking the end of a 20-year war that left the Islamist militia stronger than it was in 2001.