Former Afghanistan president Ashraf Ghani apologized for the sudden collapse of his government when he fled the country as Taliban insurgents reached the outskirts of the capital city of Kabul last month.

Ghani, who denied he had taken millions of dollars with him as he abandoned his country, took refuge in the United Arab Emirates.

"Leaving Kabul was the most difficult decision of my life," the exiled president said, adding he was sorry he "couldn't make it end differently."

Ghani said it was not his intention to abandon his people but "it was the only way." He added that when the Taliban entered the presidential palace, they started looking for him "from room to room."

Recent reports said the Afghan president fled to avoid being killed by the Taliban and to prevent bloodshed on the streets.

But bloodshed immediately followed, with the Taliban going house-to-house to hunt down and execute former government employees, culminating in an Islamic State suicide attack that left some 180 people dead.

The 72-year old defeated leader said accusations that he had travelled to the UAE with suitcases stuffed with nearly $170 million was "utterly baseless and false."

"Corruption is a plague that has crippled our nation for many years and fighting corruption has been the main focus of my efforts as president," Ghani said in quotes by Reuters, adding he and his Lebanese-born wife were "scrupulous" in their personal finances.

Ghani, who said he fled at the urging of his government advisers and security team, pointed out that he had devoted two decades to helping Afghanistan become a "prosperous, democratic, and sovereign state."

Ghani has been broadly criticized for the killings which followed his hasty retreat, including by U.S. President Joe Biden who said the Afghan government and its security forces had chosen not to "fight for their country."

Earlier this week, the Taliban announced the creation of an all-male interim government to govern Afghanistan.

On Wednesday, several women in the capital city as well as in Afghanistan's north-eastern province of Badakhshan, protested against the Taliban's new cabinet, saying they would oppose a government that won't include women as ministers.