Afghan President Ashraf Ghani, center, holds a press conference in Kabul on Feb. 16, 2019, the day after announcing he won the presidential election. Ghani beat former Afghan President Hamid Karzai, left, for second place. (AP Photo/Rahmat Gul)

Hours after outgoing President Ashraf Ghani claimed victory in last year’s presidential election, the international community leapt to his defense. “I want to congratulate President Ashraf Ghani on his victory in the presidential election,” said United Nations Secretary-General Antonio Guterres.

As Ghani was taking the stage to deliver his victory speech, he was interrupted with chants of “Get Out” by demonstrators from the Mohammadzada tribe in eastern Afghanistan.

The support for Ghani is particularly striking because in recent weeks, there have been worrying signs that the international community is beginning to lose faith in Afghanistan’s political process. Ghani and the Afghan parliament were held responsible for a near-complete failure to conduct a fair election. Accusations of vote rigging and intimidation were widespread. Hamid Karzai, former president, refused to recognize Ghani’s win. Although several members of the Afghan electoral oversight body signed a declaration backing Ghani’s candidacy, it’s unclear if they’ll be paid the promised salaries. And Ghani’s surprise election win came amid allegations that his allies turned a blind eye to the influence of warlords in Afghanistan’s politics, a problem that plagues all of the nation’s institutions.

“I repeat, I welcome the President’s victory and the strong support he has from the international community, including the UN,” said Guterres.

“But I am deeply disappointed that no international organizations, civil society, or Afghan media teams have been granted access to the entire election process,” he added.

Addressing the opposition after the polls closed on April 20, Ghani insisted that he wasn’t trying to “seize power” and that the election would produce a “president of every Afghan.” He highlighted the significance of his victory, saying, “We are going to be faced with a lot of enemies, but I’m confident that you will be victorious.” And Ghani celebrated the value of reconciliation. “We are here to work for reconciliation with the moderate majority of the Afghan people, so that we can build our country based on … respect and inclusiveness.”

But Ghani’s words were a far cry from those he made just two years ago. “Now, we need to make a plan to build a new, inclusive, stable, and prosperous Afghan nation,” he said in May 2017, after announcing the results of the 2014 election. By the end of that year, Ghani had ousted his chief of staff, and also announced his signature on the government’s anti-corruption decree. But there were few signs that he had worked to fight corruption and establish a more inclusive government.

“The extent of the fraud is almost beyond imagination,” said Ian Martin, International Crisis Group’s Afghanistan analyst.

The mistrust among Afghanistan’s political elites has been growing, according to Martin. A report commissioned by the Afghan parliament found that at least 100 seats in the parliament had been influenced by warlords who forced their supporters into voting for Ghani, effectively using the election as a proxy war. The parliament’s membership has been reduced to 113 seats because of allegations of election fraud.

“This is real state capture,” said Martin. “You have a system which has been out of balance to have the legal powers over the legal structures of government.”

Despite the skepticism regarding the legitimacy of the election, it’s hard to imagine the international community abandoning Kabul anytime soon. Over the past two decades, they’ve poured billions of dollars into Afghanistan in an effort to beat back Taliban insurgency and establish stable, strong democracy. It’s therefore unlikely that a civilian government would be able to assume control of the military without international support.

“The election was a clear failure,” said Zubair Balkhi, senior associate for South Asia at the Atlantic Council’s Rafik Hariri Center for the Middle East. “But a major challenge is to start implementing the results of the election while ensuring that it is credible.”