Just a year after David Cameron said the war was over, members of the SAS and SBS along with US special forces are taking part in military operations almost every night as the insurgent forces close in on the capital Kabul.
British troops are supposed to be just advisers to the Afghanistan special forces, who they have spent years training.
But senior defence sources say that in reality the troops are planning and leading counter-terrorist strike operations.
One source said: “In the last six months the British special forces have gone from training Afghan commando units to kicking down doors and arresting Taliban suspects.
There have been some pretty hairy firefights but fortunately no casualties.
“The Afghan Special forces are enthusiastic amateurs but they do not have the ability to plan and execute counter-terrorist operations.”
Now the British and US troops are also involved in a fight against an Islamic State splinter group, which has declared war on all foreign forces, the Afghan government and the Taliban.
The IS group has been strengthened by hundreds of Taliban fighters who have switched sides. They killed 10 civilians just last week. Defence chiefs fear IS could usurp the Taliban as the main terrorist group in the country.
British special forces stayed behind in Afghanistan at the end of 2014 to help create and train a local special forces unit.
The elite force is also tasked with protecting British officials and troops training Afghan officers.
But they have been increasingly drawn into counter-terrorist operations as the security situation in the country deteriorates.
Defence sources say they have been calling in air strikes using US drones as well as conducting night raids against the Taliban and al-Qaeda insurgents.
An MoD spokesman said: “We have a range of security measures in place to make sure our people are properly protected.”