Afghan President Ashraf Ghani and his rival Abdullah Abdullah have signed a power-sharing deal, ending a bitter months-long feud that plunged the country into political crisis.
The breakthrough, which sees Mr Abdullah heading peace talks with the Taliban, comes as Afghanistan battles a rapid spread of the deadly coronavirus and surging militant violence that saw dozens killed in brutal attacks last week.
"Doctor Abdullah will lead the National Reconciliation High Commission and members of his team will be included in the cabinet," Sediq Sediqqi, spokesman for Mr Ghani, wrote on Twitter.
Mr Abdullah's spokesman, Fraidoon Khawzoon said the agreement ensures Abdullah's group gets 50% of the cabinet and other provincial governors' posts.
Mr Ghani said it was a "historic day" for Afghanistan and that the agreement was reached without any international mediation.
"We will share the burden and our shoulders, God willing, will be lighter," he said, addressing Mr Abdullah at the signing ceremony broadcast on a state-run television channel.
"In the days ahead, we hope that with unity and cooperation, we would be able to first pave the ground for a ceasefire and then lasting peace."
Mr Abdullah said the deal commits to forming a "more inclusive, accountable and competent administration".
"It's meant to ensure a path to peace, improve governance, protect rights, respect laws and values, he said on Twitter after signing the deal.
NATO, which maintains a training mission in Afghanistan, hailed the agreement and urged Afghan leaders and the Taliban to work for peace.
"We call on the Taliban to live up to their commitments, reduce violence now, take part in intra-Afghan negotiations, and make real compromise for lasting peace," NATO chief Jens Stoltenberg said in a statement.
The agreement further says that Mr Ghani will make Abdul Rashid Dostum, his former vice president turned ally of Mr Abdullah, a marshal of the armed forces.
Dostum, a notorious former warlord, is accused of ordering the torture and rape of a political rival in 2016.
The Political Agreement between President Ghani and Dr. Abdullah Abdullah has just been signed. Dr. Abdullah will lead the National Reconciliation High Council and members of his team will be included in the cabinet. Details will be aired shortly by RTA. pic.twitter.com/VZ95m5DfJq— Sediq Sediqqi (@SediqSediqqi) May 17, 2020
US pressure on rivals
Pictures released by the presidential palace showed Abdullah and Ghani sitting side-by-side for the signing ceremony, while leading Afghan figures including former president Hamid Karzai looked on.
Mr Abdullah had previously served as Afghanistan's "chief executive" under an earlier power-sharing arrangement, but lost that post after he was defeated in a presidential election that incumbent Ghani - a former World Bank economist - won in September amid claims of fraud.
US aims to withdraw all forces from Afghanistan within 14 months: US-Afghan declaration
US carries out first airstrike on Taliban since Doha deal
Trump holds 'very good talk' with Taliban leader
Mr Abdullah, an ophthalmologist, declared himself president and held his own swearing-in ceremony on 9 March, the day Mr Ghani was re-installed as president.
Experts feel today's deal could help pull Afghanistan out of political crisis.
The agreement names Mr Abdullah to lead future peace talks with the Taliban, who have already signed a landmark accord with Washington to pave the way for the withdrawal of foreign forces from Afghanistan.
"It is now expected that these leaders resolve the problems that Afghanistan faces such as the coronavirus and peace talks with the Taliban," Kabul-based political analyst Sayed Nasir Musawi said.
He said "immense pressure" from the United States pushed the rivals to agree to the deal.
"But it is difficult... differences will remain until they reach an agreement with the Taliban," added Mr Musawi.
Abdullah and Ghani also contested the 2014 presidential election, with both claiming victory.
To avert a full-blown conflict, then-US secretary of state John Kerry brokered a deal between the two that left Abdullah as the country's chief executive.
But after a similar impasse in March, an exasperated US Secretary of State Mike Pompeo lashed out at the failure of the two leaders to come to an agreement, and announced a $1bn cut in aid to Afghanistan.
With the impoverished country's GDP just $20bn, the cut was a devastating blow to its donor-dependent economy.
Several residents in the capital Kabul expressed scepticism at the deal.
"If they really want to work for the country... they have to bring genuine peace to the country, that is the only thing the majority of Afghans want," said Rashed Hashemi, an employee at a private company in Kabul.
The deal comes as President Donald Trump has made it a priority of his administration to end America's longest war.
In February, Washington signed a deal with the Taliban which stipulates that the US and its foreign allies will withdraw all forces from Afghanistan by early 2021.
In return, the Taliban agreed not to attack foreign troops.
But fighting between the Taliban and Afghan forces continues to rage in the provinces, with both sides threatening to go on the offensive after two attacks last week that left dozens killed, including mothers and infants when gunmen raided a hospital in Kabul.
The Taliban have denied responsibility for the hospital attack, which the US blamed on the Islamic State group.