KABUL, Afghanistan (AP) — Afghan President Ashraf Ghani and political rival Abdullah Abdullah signed a power-sharing agreement, two months after both declared themselves the winner of last September's presidential election, Ghani’s spokesman said Sunday.

The political deal would see Ghani remain president of the war-torn nation, tweeted his spokesman Sediq Sediqqi. The deal also calls for Abdullah to lead the country's National Reconciliation High Council, and he will be able to appoint half of Ghani's Cabinet.

The Reconciliation Council has been given the authority to handle and approve all affairs related to Afghanistan's peace process.

Omed Maisam, a spokesman for Abdullah’s team, confirmed an agreement had been signed at the presidential palace. “A technical team will work on the implementation of the agreement and details will be shared later,” he said.

Afghanistan has been in political disarray since the country's election commission in December announced Ghani had won the Sept. 28 election with more than 50% of the vote. Abdullah had received more than 39% of the vote, according to the election commission, but he and the Elections Complaint Commission charged widespread voting irregularities.

Ghani and Abdullah both declared themselves president in parallel inauguration ceremonies in March. They have been locked in a power struggle since then and the discord prompted the Trump administration to announce it would cut $1 billion in assistance to Afghanistan if the two weren't able to work out their differences.

A peace agreement between the U.S. and the Taliban signed Feb. 29 calls for U.S. and NATO troops to leave Afghanistan. It was seen at the time as Afghanistan’s best chance at peace following decades of war.

Since then, the U.S. has been trying to get the Taliban and the Afghan government to begin intra-Afghan negotiations, but the political turmoil and personal acrimony between Ghani and Abdullah impeded talks. Negotiations that were to take place in March never happened.

The five-page agreement announced Sunday showed Abdullah, as head of Reconciliation Council, will have the authority to specify, approve and lead all affairs related to the peace process, and can issue executive orders. The council will have five deputies from the both teams.

Another important point in the agreement is granting the rank of marshal to Gen. Abdul Rashid Dostum, a strong Abdullah supporter and ex-vice president.

A former Uzbek warlord, Dostum left Afghanistan in 2017 to Turkey after the attorney-general’s office launched an investigation into allegations that his followers had tortured and sexually abused a former ally turned political rival. On Dostum's return to Kabul in 2018, an Islamic State suicide bomber carried out an attack near the airport, killing 14 people and narrowly missing Dostum.

Despite 18 years and billions of dollars in international aid, Afghanistan remains desperately poor. The poverty level soared from 35% of the population in 2012 to more than 55% last year. Poverty in Afghanistan is defined as a person who survive on $1 or less a day. Successive Afghan governments, including Ghani’s, have been accused by international watchdogs of widespread corruption.

Meanwhile, Kabul and other cities are in lockdown to stem the spread of the coronavirus. Afghanistan has performed only limited testing so far with about 22,000 tested. The country has more than 6, 400 confirmed infections in a nation of 36.6 million. As more testing becomes available, the country’s confirmed infection numbers will likely rise sharply, according to public health officials. The death toll — officially at 168 — is likely much higher.

The country’s health care system, devastated by four decades of war, is woefully unprepared for a major outbreak.