A local security official confirmed that the Afghan forces retreated from the area after they were under siege for several days.
The official further added that the security personnel under the siege of the Taliban insurgents were rescued from the area.
The Taliban group earlier claimed that several security personnel were killed during the clash with the Taliban insurgents.
Heavy clashes in Surkh Kotal erupted late on Saturday night as the security officials claimed that at least 28 Taliban insurgents were killed or wounded.
The area fell to Taliban control despite continuous raids by the Afghan security forces to disperse the assailant militants.
The Ministry of Defense said Tuesday that 31 militants were killed in the air and ground operations of the Afghan security forces in Surkh Kotal and Baghlan Markzai district.
Surkh Kotal is located in the outskirts of Baghlan near province where and the area has been witnessing violence during the past several months.