Mr Tshisekedi, who received more than seven million votes (38%) had not been widely considered the leading candidate and is relatively untested.

The son of late opposition leader Etienne, who pursued the presidency for many years, he surprised many last year by breaking away from an opposition effort to unite behind a single candidate.

Some observers have suggested that President Joseph Kabila’s government sought to make a deal as hopes faded for a win for ruling party candidate Emmanuel Ramazani Shadary, who received more than four million votes (23%).

Opposition candidate Martin Fayulu wipes his face before speaking to the press in Kinshasa (Jerome Delay/AP)

It is not immediately clear whether opposition candidate Martin Fayulu, who had vowed to clean up DR Congo’s widespread corruption and led in polling, will contest the results.

The constitutional court has 14 days to validate them. Mr Fayulu received more than six million votes (34%).

This is DR Congo’s first peaceful, democratic transfer of power since independence in 1960.

Mr Kabila has ruled since 2001 in the troubled nation rich in the minerals key to smartphones around the world and has amassed vast wealth.

He is barred from serving three consecutive terms, but during more than two years of election delays many Congolese feared he would find a way to stay in office.

This is the beginning of national reconciliation

“This is the coronation of a lifetime,” the deputy secretary-general of Mr Tshisekedi’s party, Rubens Mikindo, said above the cheers at party headquarters.

“This is the beginning of national reconciliation.”

Scores of people in the capital, Kinshasa, danced after the election results were announced long after midnight, but observers waited to see how other Congolese would respond, especially after Mr Fayulu this week warned that the results were “not negotiable”.

Activist groups on Wednesday urged people to “be ready to massively take to the streets” if results did not match “the truth of the ballot boxes”.

Residents celebrate in Kinshasa (Jerome Delay/AP)

Attention turns to DR Congo’s powerful Catholic church, which has said its 40,000 election observers at all polling stations found a “clear winner” but was barred by electoral regulations from saying more.

The delayed results come after international pressure to announce an outcome that reflected the will of the people.

The United States threatened sanctions against officials who rigged the vote.

The largely peaceful election was marred by the malfunctioning of many voting machines that DR Congo used for the first time.

Dozens of polling centres opened hours late as materials went missing. And in a last-minute decision, some one million of the country’s 40 million voters were barred from participating, with the electoral commission blaming a deadly Ebola virus outbreak.

Defiantly, tens of thousands of voters in one of the barred communities held their own ballot on election day. Mr Fayulu won easily.

DR Congo’s government cut internet service the day after the vote to prevent speculation on social media. As the electoral commission met this week, anti-riot police moved into place outside.

On Wednesday afternoon, hours before results were announced, some Tshisekedi supporters began to celebrate at his Union for Democracy and Social Progress party headquarters, with calendars already printed saying “Felix Tshisekedi president”.

Mr Tshisekedi, 56, took over as head of DR Congo’s most prominent opposition party in early 2018, a year after his father’s death.