AFP file photo
Kabul - Ghani did not say where he had travelled to, but Afghan media group suggested he had gone to Tajikistan.
Afghan President Ashraf Ghani said that he had fled the country on Sunday to "prevent a flood of bloodshed", as the Taliban entered the capital, capping a lightning offensive across the country.
Listen to this story on the 8@8 with David Light podcast
Taliban militants have now entered the capital. Three senior Taliban sources told AFP that the insurgents had taken control of the presidential palace and were holding a meeting on security in the capital.
Ghani said he believed "countless patriots would be martyred and the city of Kabul would be destroyed" if he had stayed behind.
"The Taliban have won... and are now responsible for the honour, property and self-preservation of their countrymen," he said in a statement posted to Facebook.
"They are now facing a new historical test. Either they will preserve the name and honour of Afghanistan or they will give priority to other places and networks," he added.
He did not say where he had travelled to, but leading Afghan media group Tolo news suggested he had gone to Tajikistan.
Abdullah Abdullah, who heads the peace process, had earlier accused Ghani of "leaving the people to this situation".