Former Afghan President Ashraf Ghani defended his decision to flee Kabul in August as the Taliban closed in.

Ghani said in a statement Wednesday that he had left at the "urging of the palace security" who had advised him that "to remain risked setting off the same horrific street-to-street fighting the city had suffered during the Civil War of the 1990s."

FEMALE STUDENT IN AFGHANISTAN ON TALIBAN CONTROL: 'THEY ARE TRYING TO IMPRISON US ONCE AGAIN'

He said leaving Afghanistan's capital was the "most difficult decision" of his life but he believed it was the only way to save the city of millions.

"I have devoted 20 years of my life to helping the Afghan people work toward building a democratic, prosperous, and sovereign state –  it was never my intent to abandon the people or that vision," Ghani said.

The leader next sought to again address what he called the "baseless allegations" that he had taken millions of dollars belonging to the Afghan people as he left Kabul.

"These charges are completely and categorically false. Corruption is a plague that has crippled our country for decades and fighting corruption has been a central focus of my efforts as president," he said. "I inherited a monster that could not easily or quickly be defeated."

Ghani said he welcomed an official audit or financial investigation under U.N. auspices or "any other appropriate independent body" to prove the veracity of his statements and that close aides are ready to submit their finances to public audit as well.

Ghani said he has "firmly believed that the formula of a democratic republic was the only way forward for a sovereign, peaceful, prosperous Afghanistan," citing guidance from the 2004 Constitution of the Islamic Republic of Afghanistan.

EXILED AFGHAN LEADER ASHRAF GHANI CLAIMS HE ‘WOULD HAVE BEEN HANGED’ HAD HE STAYED: REPORT

"I offer my profound appreciation and respect for the sacrifice of all Afghans, especially our Afghan soldiers and their families, through the last forty years. It is with deep and profound regret that my own chapter ended in similar tragedy to my predecessors – without ensuring stability and prosperity," he said. 

CLICK HERE TO GET THE FOX NEWS APP

"I apologize to the Afghan people that I could not make it end differently. My commitment to the Afghan people has never wavered and will guide me for the rest of my life," Ghani concluded.