Ghani fled Afghanistan as the Taliban approached Kabul, the capital, on Sunday, less than 24 hours after he tried to rally his people in a televised address in which he pledged not to give up the "achievements" of the 20 years since the U.S. toppled the Taliban.
His whereabouts were unknown until the UAE released a single line statement confirming it had offered him sanctuary.
Download the NBC News app for breaking news and politics
“The UAE Ministry of Foreign Affairs and International Cooperation can confirm that the UAE has welcomed President Ashraf Ghani and his family into the country on humanitarian grounds,” it said.
After the statement was released, Ghani who has been bitterly criticized by former ministers for leaving the country, gave a speech in a video streamed to Facebook from his new home.
"If I had stayed, I would be witnessing bloodshed in Kabul," Ghani said, according to the Associated Press. He also denied reports he took large sums of money with him as he departed the presidential palace, the AP reported.
Elected president in 2014, Ghani took over from Hamid Karzai, who became Afghanistan's leader after the U.S.-led invasion in 2001. After another fractious and bitterly disputed contest, Ghani was re-elected five years later.
Before both elections he pledged to fight rampant corruption and fix the country’s crippled economy, but the former World Bank academic was unable to deliver on many of his promises, becoming an increasingly isolated figure at home and abroad.
The Taliban’s return to power in Afghanistan gives them the huge task of controlling and running daily life across the country.
A Taliban commander in Kabul admitted to NBC News that their takeover of the country happened very quickly — “beyond their imagination" — leaving them at a loss at how to govern.
The group’s actions are being watched closely after a Taliban spokesperson delivered security guarantees during a news conference Tuesday in Kabul and insisted that it would not impose the same draconian restrictions it had when it last ruled Afghanistan in the years before the 9/11 attacks.
Many Afghans remain skeptical as thousands try to make it to the airport in Kabul or the country’s borders to leave.
Others are hiding inside their homes, fearful after prisons and armories were emptied during the insurgents' blitz across the country.