An Afghan soldier who was hailed as a hero for defending parliament, but subsequently arrested for his involvement in a car crash, has now been freed from prison, police say.
Sgt Esa Khan killed six Taliban fighters who attacked parliament in June, receiving widespread praise and a new home and car from the government.
He was arrested in July, after a deadly crash involving the car he was given.
He has now been freed while authorities investigate the crash, police say.
Kabul police chief Abdul Rahman Rahimi told the BBC: “Esa Khan is free in exchange of guarantees.”
This means that Sgt Khan is able to leave prison and move freely within Afghanistan, until the trial begins.
Gen Rahimi did not provide further details on who had agreed to act as guarantor to the soldier.
Legal proceedings against Sgt Khan would continue, the police chief said, adding: “If [the court] sentences him to jail, he will come to us and will complete the rest of his sentence… If the court orders his release after all investigations, he will be free.”
Sgt Khan killed six of the seven militants who detonated a car bomb and attempted to storm the parliament in Kabul on 22 June.
At least two civilians died in the militant attack and about 40 people were wounded.
Sgt Khan was lauded as a hero following the attack, and was presented with keys to a new home by President Ashraf Ghani the next day.
Vice-President Abdul Rashid Dostum also awarded Sgt Khan a new car, money and a medal, while some MPs gave him a month of their salaries.
Sgt Khan was arrested on 2 July after a car crash involving his new vehicle, which killed one civilian, officials said.