The government of the Central African Republic and 14 armed groups on Tuesday inked a new peace accord seeking to end years of fighting that have left thousands of people dead.
The accord was initialled by President Faustin-Archange Touadera for the CAR government and representatives of militias which control most of the chronically-troubled country.
It will be formally signed in the CAR capital of Bangui "in the coming days," Touadera's office said, without announcing a date.
"The Khartoum Agreement opens the door for peace to return to our homeland," Touadera declared at the ceremony. "It is now time to open a new page for Central Africa. Let's go together to Bangui to build our country together."
The agreement, brokered by the African Union after 18 months of exploratory work and sponsored by the UN, is the eighth attempt in almost six years to forge peace in a country stricken by turmoil and poverty.
Thousands of people have been killed and a quarter of the population of 4.5 million have fled their homes.
The UN says unrest has driven so many people from their farms that hundreds of thousands are at risk of famine.
Herbert Gontran Djono Ahaba, speaking on behalf of the armed groups, said: "The difficult time starts now, and that is implementing the Khartoum Agreement... This agreement is crucial for peace."
Sudanese President Omar al-Bashir said his country was delighted to have hosted the talks and vowed to "continue to be a partner" in peace efforts.
After the agreement was initialled, representatives of the armed groups shook hands with Touadera and Bashir.
The text of the agreement was not immediately made public, and there was no word on what compromises may have been needed to achieve it.
"The contents will be made public after the signature," the head of the CAR government delegation, Firmin Ngrebada, said.
Past stumbling blocks in peace negotiations have include rebel demands for an amnesty, something that the CAR government, under pressure from Western allies, has refused.
After the deal was announced on Saturday, Aboubakar Sidik, spokesman for one of the main armed factions, the Popular Front for the Rebirth of Central African Republic (FPRC), said "a consensus has been reached on sticking points which were an amnesty and an inclusive government."
The history of peacemaking in the CAR is littered with failures. All seven previous agreements have failed to stick.
The last attempt, in 2017, was forged with the help of the Catholic church, but fighting resumed within a day, leaving a hundred people killed in the central town of Bria.
In Bangui, local resident Ambroise Saraga said hopes were high that this deal stood a better chance.
"This is what we've been expecting, that two sides who do not get along meet around a (negotiating) table," he said.
At citizens' meetings and forums around the country, many members of the public had expressed "zero tolerance" for those who committed crimes and violence, he said.
The Khartoum talks began on January 24 after several false starts because of outstanding differences. A major sticking point was the creation of a mechanism to follow up any peace agreement.
The CAR began its descent into turmoil in 2012, when a mainly Muslim rebel movement called the Seleka rose in the country's north.
The following year, insurgents overthrew President Francois Bozize, a Christian -- a move that triggered the rise of a predominantly Christian militia called the anti-Balaka.
Fearing a Rwandan-style genocide, former colonial ruler France intervened militarily under a UN mandate.
The Seleka were forced from power and in February 2016, Touadera, a former prime minister, was elected president.
But Touadera only controls a fraction of the state, despite the support of more than 13,000 troops and police in the UN's MINUSCA mission.
Eighty percent of the country is held by militias, who typically portray themselves as defenders of a community or religious group but often fight over mineral wealth -- a hoard that ranges from gold to uranium and diamonds.