Kinshasa: Opposition leader Felix Tshisekedi was on Thursday declared the victor of DR Congo’s controversial presidential election in a surprise result swiftly denounced by his rival as a “coup".

In a pre-dawn announcement, the election commission named Tshisekedi, son of the country’s late veteran opposition leader, as provisional winner of the bitterly-contested December 30 vote.

At stake is political stewardship of the notoriously unstable central African nation which has never known a peaceful transition of power since independence from Belgium in 1960.

Tshisekedi’s apparent victory was greeted by celebrations at the headquarters of the Union for Democracy and Social Progress (UDPS), the country’s oldest and largest opposition party which was founded by his father Etienne.

The 55-year-old immediately pledged to work closely with current incumbent Joseph Kabila.

“Today we should no longer see him as an adversary, but rather as a partner for democratic change in our country," he told supporters.

But the result was immediately denounced by his opposition rival Martin Fayulu, the runner up, who slammed the announcement as “an electoral coup".

French Foreign Minister Jean-Yves Le Drian said the declared outcome was “not consistent" with the results, saying that Fayulu appeared to have won.

With the vast central African country increasingly on edge over the long-delayed vote to replace Kabila, who has ruled the country with an iron fist since 2001, the United Nations warned against any resort to violence.

“The Secretary-General calls on all stakeholders to refrain from violence and to channel any eventual electoral disputes through the established institutional mechanisms," spokesman Stephane Dujarric said late Wednesday.

Kabila had been due to step down two years ago, but managed to cling on to power, sparking an escalating political crisis marked by widespread protests that were brutally repressed, leaving dozens of people dead.

The vote finally took place at the end of December, pitting Kabila’s handpicked successor Emmanuel Ramazani Shadary against Tshisekedi and Fayulu, a fiery orator who emerged from relative obscurity to take a front seat in the race.

Election chief Corneille Nangaa declared Tshisekedi the winner with 38.57 percent of the vote, just ahead of Fayulu with 34.8 percent.

Shadaray came third with 23.8 percent.

The announcement of an opposition win was a shock as many had expected the results to be stacked in Shadary’s favour, prompting heavy international pressure on Kinshasa to respect the wishes of the electorate while the mammoth ballot count was under way.

But Thursday’s outcome was swiftly denounced by Fayulu as a sham.

“These results have nothing to do with the truth at the ballot box," he told Radio France International.

“It’s a real electoral coup, it’s unbelievable," he said. “It’s an ugly scam by Nangaa and his political cronies.

“They have stolen the Congolese people’s victory and the people will never accept that."

France’s Le Drian also said Fayulu had apparently won, pointing to a parallel count by DR Congo’s powerful Catholic Church which deployed more than 40,000 people to observe the vote.

Last week, CENCO, the body that represents the country’s Catholic bishops, said it knew the outcome of the vote and urged the electoral commission to publish the results “in keeping with truth and justice".

Although it did not name the winner, its announcement drew a sharp rebuke from the ruling coalition.

Analysts described Tshisekedi’s win as “highly surprising" but said it made sense in the context of DRC’s political dynamics.

“Kabila did not want to risk announcing Shadary as the winner, which would have triggered violent protests and international condemnation.

“Instead, he chose to split the opposition by creating a power-sharing deal with Tshisekedi," said Robert Besseling, executive director of risk consultancy EXX Africa.

“Kabila will be able to influence Tshisekedi, who now owes his ascendancy to power to Kabila’s control of the electoral commission."

He said the result was “starkly at odds" with CENCO’s parallel vote tabulation.

And in a country of 80 million where half the population are Catholic, CENCO’s assessment that the outcome was rigged was likely to be widely accepted, he added.

Speaking to Belgian public radio, Tshisekedi’s spokesman denied any deal with Kabila, saying the people had simply voted for change.

“There was never any deal," Louis d’Or Ngalamulume said.

“I understand Mr Fayulu may be a bit disappointed by the result but it is the Congolese people who are sovereign and they decided to give the victory to Felix Tshisekedi."

In Kinshasa, the ruling coalition said it had “taken note" of Tshisekedi’s win but expressed disappointment at Shadary’s score, saying it would verify the figures before the definitive results are released on January 15.

The new president is expected to be sworn in three days later.

Ahead of the results announcement, police had deployed throughout Kinshasa, where residents went home early for the second day running fearful of unrest.

The last two elections in 2006 and 2011, both of which were won by Kabila, were marred by bloodshed, and many fear a repeat of the violence if there is any sense the result has been fixed.

In 2006, Kabila defeated former warlord Jean-Pierre Bemba in a violence-tainted poll, and five years later, he was re-elected in another vote blighted by bloodshed, chaotic organisation and alleged irregularities.

This time round, Bemba -- who was barred from running -- threw his weight behind Fayulu as did another opposition heavyweight, former Katanga governor Moise Katumbi.

This story has been published from a wire agency feed without modifications to the text. Only the headline has been changed.