Ashraf Ghani - who left Afghanistan on Sunday after the rapid advance of Taliban fighters across the country and their entry into the capital Kabul - was twice elected president of Afghanistan, as well as being one of the country's most famous academics.

Government officials said President Ghani left the country hours after the Taliban entered the capital.

It is not yet clear where he is heading or how the power will be transferred.

Ghani was first elected in 2014, and he took over from Hamid Karzai, who led Afghanistan after the US-led invasion in 2001. Ghani oversaw the end of the US combat mission and the almost complete withdrawal of foreign forces from the country, as well as a faltering peace process with the Taliban .

Ghani has made efforts to make ending the nearly 20-year-old war a top priority, despite continued Taliban attacks on his government and security forces.

And last year 2020, peace talks with the movement began in the Qatari capital, Doha.

Foreign governments have been frustrated by the slow progress of the talks, and calls for the formation of an interim government to replace his administration have increased.

During his presidency, Ghani managed to appoint a new generation of educated young Afghans to leadership positions, at a time when the knuckles of power in the country were dominated by a handful of elite figures and patronage networks.

He pledged to fight rampant corruption, fix a crippled economy and turn the country into a regional trading hub between Central and South Asia, but he has been unable to deliver on most of those promises.

A long way

Ashraf Ghani is an anthropologist who was educated and trained in the United States and also holds a Ph.D. from Columbia University in New York,

He was named one of the world's 100 most prominent thinkers by Foreign Policy magazine in 2010.

Ghani spent nearly a quarter of a century outside Afghanistan during the turbulent decades of Soviet rule, civil war and Taliban rule.

During that time, he worked as a professor in the United States and later worked for the World Bank and the United Nations in East and South Asia.

Within months of the US-led invasion of Afghanistan, he resigned from his international posts and returned to Kabul to become a senior advisor to newly appointed President Hamid Karzai.

He became Afghanistan's finance minister in 2002, but fell out with Karzai.

He was appointed as an advisor to Kabul University in 2004, and established a Washington-based think tank that worked on policies aimed at empowering some of the world's poorest people.

In 2009, Ghani - who belongs to the ethnic Pashtun majority in the country, like Karzai - ran for the presidency, but came in fourth place, receiving only 4% of the vote nationwide.

He continued to serve in important roles in Afghanistan, including chairing a body overseeing the transition of security functions from NATO to Afghans.

Because the Afghan constitution prevented Karzai from running for a third term, Ghani launched a successful second election campaign in 2014 and was re-elected in 2019.

But his relationship with Washington and other Western capitals was not smooth, according to Reuters, which says that he was an outspoken critic of what he described as wasted international aid in Afghanistan, and his vision usually did not coincide with the West's vision of the Afghan strategy, especially with regard to discussing accelerating the slow and difficult peace process with the Taliban.

In an interview with the British Broadcasting Corporation "BBC" (BBC), Ghani said that "the future will be determined by the people of Afghanistan and not in the hands of a person sitting behind a desk dreaming."