KABUL, Afghanistan (AP) — Afghanistan’s rival leaders were each sworn in as president in separate ceremonies on Monday, throwing plans for negotiations with the Taliban into chaos and creating a dilemma for the United States as it figures out how to move its peace deal with the Taliban forward.

The U.S.-Taliban deal signed just over a week ago was touted as Washington’s effort to end 18 years of war in Afghanistan and was seen by many Afghans as the best opportunity yet for bringing an end to relentless wars.

But the sharpening dispute between President Ashraf Ghani, who was declared the winner of last September’s election, and his rival Abdullah Abdullah, who charged fraud in the vote along with the elections complaints commission, threatens to wreck the next key steps and even risks devolving into new violence.

The rivals held simultaneous inauguration ceremonies, each packed with his supporters — Ghani’s in the presidential palace and Abdullah’s next door in the Sapedar Palace.

Even as Ghani was winding up his thank you speech, blasts of rocket fire were heard hitting near the presidential palace. “We have seen bigger attacks. Don’t be afraid of just two blasts,” Ghani said, raising his hands and urging rattled participants to stay in their seats. The perpetrators of the fire were not immediately known, but the scene hiked worries that the split will open the door to violence.

In a sign of international support for Ghani, his ceremony — aired on state TV — was attended by Washington’s peace envoy Zalmay Khalilzad, Gen. Austin S. Miller, the head of U.S. forces in Afghanistan, as well as a number of foreign dignitaries including the U.S. Embassy’s charge d’affaires and Tadamichi Yamamoto, the U.N. Secretary General’s personal representative to Afghanistan.

At Abdullah’s inauguration, aired on private Tolo TV, among those present were so called “jihadi’ commanders, who participated in the brutal civil war of the 1990s and were among those who allied with the U.S.-led coalition to topple the Taliban in 2001.

Both candidates — but particularly Abdullah — are backed by warlords with heavily armed militias, underscoring fears they could use force to back their candidate. The rival claims to be president have the potential to further split and weaken Afghanistan’s fragile institutions, including the military, if they demand their authority be recognized.

When Washington and the Taliban insurgents signed their accord on Feb. 29, the next crucial step was to be intra-Afghan talks in which all factions including the Taliban would negotiate a road map for their country’s future. They are looking to hammer out such thorny issues as women’s rights, free speech and the fate of tens of thousands of armed men on both sides of the 18-year war.

Those negotiations were set to be held Tuesday in Oslo, but the political chaos in Kabul makes it a near impossibility. Ghani said he will announce his team Tuesday, though it appears Abdullah may also announce his negotiating team.

At the dueling inaugurations, both men offered their peace plan. Abdullah said he had no preconditions for talks and promised his team would be inclusive, but did not elaborate. Ghani said he understood that another promise of a reduction of violence would come from the Taliban in exchange for the release of their prisoners. There was no comment from the Taliban to this and previously they said their earlier commitment was only for seven days and a cease fire would be part of negotiations.

The U.S. has said its troop withdrawal from Afghanistan over an 18-month period provided for in the deal will be linked to the Taliban keeping their counter-terrorism promises, but not to the success of talks between the Taliban and the Afghan government

Afghanistan’s election commission declared incumbent Ghani as the winner of September’s vote. His former partner in a unity government, chief executive Abdullah, as well as the election complaints commission say the results are fraught with irregularities. As a result, both Ghani and Abdullah declared themselves winners.

The dueling inaugurations took place despite last-minute shuttle diplomacy by Khalilzad, who reportedly went back and forth between the two Afghan rivals into the early hours Monday. He asked both sides to delay their inaugurations three days to sort out the stalemate, a senior member of Abdullah’s team, Basir Salangi, told Tolo TV. Abdullah reportedly said he was ready, but only if Ghani also agreed.

Taliban spokesman Zabihullah Mujahed, in response to questions from The Associated Press, said late Sunday that the Taliban were still committed to the deal, but said the dueling presidential inaugurations “are not good for the Afghan nation.”

Until now the Taliban have refused to sit with Ghani’s government. There was no immediate comment from the Taliban.

As well as competing candidates, Khalilzad still has to get some agreement on a prisoner release, which was supposed to be settled before the intra-Afghan negotiations could begin. The U.S.-Taliban deal said 5,000 Taliban prisoners and up to 1,000 captives from the government side would be freed as a goodwill gesture ahead of the talks.

Ghani has said he won’t release the Taliban prisoners, even as U.S. Secretary of State Mike Pompeo called on all sides to stop posturing and free their prisoners, some of whom have already served their sentences. Pompeo called on all sides get on with talks about the country’s future.

The Taliban spokesman told AP that the group wants their prisoners released and were ready to free the captives they’re holding. Mujahed said they did not want to see a delay but reiterated that if it occurred “we remain committed to the agreement.”

In a tweet, Afghanistan’s former deputy foreign minister, Jawed Luddin, thanked Washington for trying to sort out Afghanistan’s political turmoil while calling the squabbling “a mess.”

“Thank you, USA, for trying to sort out our political crisis — yet again. We know you must be sick of it — as are we Afghans,” Luddin said.

“You and us both had a hand in bringing about the mess that is today’s Afghan politics. But I wish we Afghans felt half as responsible for the mess as you do,” he added.

______

AP correspondent Kathy Gannon contributed from Islamabad.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.