The runner-up in the Democratic Republic of the Congo’s presidential election has rejected the result as an “electoral coup” and called on his followers to resist “a grave attack on the country’s dignity”, as the Catholic church said official results did not reflect polling station data.

Martin Fayulu was beaten to second place by another opposition candidate, Felix Tshisekedi, who was declared the surprise winner of the 30 December presidential election in the early hours of Thursday.

The result theoretically means the first electoral transfer of power in 59 years of independence in the DRC, but was deeply controversial because Fayulu had held a healthy lead in pre-election polling.

It has also surprised some observers who believed authorities would ensure victory for the government candidate, Emmanuel Ramazani Shadary, who was handpicked by the outgoing president, Joseph Kabila, as his successor.

Senior church leaders made clear that the announced results did not correspond with data collected by 40,000 observers the church deployed on polling day 12 days ago.

The church has refused to say publicly who won according to its findings, but diplomats briefed on the church data say it indicated a clear victory for Fayulu, in line with pre-election polls that had put him at least 20 points ahead of Tshisekedi.

Profile The Catholic church in the DRC Show The Catholic church in the Democratic Republic of Congo has enormous influence – in part a legacy of Belgian rule when it was seen as a means of reinforcing colonial control. Now, about half the 70m population are among its congregations, and it delivers vital health, educational and other services to huge numbers of people across the troubled, poverty-hit country. In the last two years, after concluding a much criticised deal which brought temporary peace but was flouted by the government, the church has increasingly led resistance to the efforts of outgoing president Joseph Kabila to remain in power. The pope has repeatedly mentioned the DRC, increasing the pressure on key players among the country’s elite. Last year, it called for peaceful protests and many died when security forces opened fire on demonstrators. The church is once again in the spotlight after Felix Tshisekedi, leader of the main opposition party, was named the winner of the 30 December presidential election. This poses a challenge to the church since church leaders have made it clear that data from the 40,000 observers they deployed on polling day show that another opposition leader, Martin Fayulu, won. “Historically the church has been an important and impartial political arbiter, with real moral authority but now the church leaders are in a difficult position… They are now likely to be seen as militating for one politician over another,” said Ben Shepherd, of London’s Chatham House. “How [the church leaders] react will go a long way to determining how the population react.” In a country as volatile as the DRC, an explicit statement backing a losing candidate could prompt chaos – something church leaders are anxious to avoid. But at the same time as playing a constructive role, they need to be seen as sticking to their principle too. “The church is the most neutral body in the country, certainly among civil society actors in politics,” said Stephanie Wolters, an analyst at the Institute for Security Studies, in South Africa. “At the moment they are walking a fine line,” said Wolters.

Official figures published by the electoral commission gave Tshisekedi 38%, four points ahead of Fayulu, a respected former business executive. His camp suspects Tshisekedi, the leader of DRC’s main opposition party, won by cutting a power-sharing deal with Kabila.

Kabila had engineered an electoral coup to deny him the presidency, Fayulu said on Thursday morning. In a statement issued later in the day, he said “unacceptable electoral fraud” had taken place that could lead to chaos across the country.

Supporters of Felix Tshisekedi celebrate his victory on the streets of Kinshasa. Photograph: Kenny Katombe/Reuters

“No Congolese can accept such treachery, such sham … we cannot accept at the end of this long crusade that the will of our people is not respected … All together, let us say ‘no’ to manufacturing of results and ‘no’ to an electoral holdup … Hand in hand may we pursue this struggle until the end,” Fayulu told his followers.

The continuing tensions threaten to tip the vast central African country into a cycle of protest, violent repression and worsening insecurity – dashing hopes that the election would mark a turning point in the DRC’s troubled history.

There were reports of scattered protests in some cities, with at least two reported deaths.

Fayulu’s supporters had long feared Kabila would either rig the vote in favour of Shadary or do a power-sharing deal with Tshisekedi.

Tshisekedi paid his respects to Kabila, whom he described as “an important partner … in democratic transition in our country”. Speaking to thousands of cheering supporters in the capital, Kinshasa, Tshisekedi said he would be the president “of all Congolese”.

Barnabé Kikaya Bin Karubi, one of Kabila’s top advisers, said he accepted the result. “Of course we are not happy as our candidate [Shadary] lost, but the Congolese people have chosen and democracy has triumphed,” Kikaya told Reuters.

Following an election itself delayed by two years, the announcement of results was postponed by a week.

Adeline Van Houtte, research analyst for west Africa at the Economist Intelligence Unit, said the delay had raised suspicions that the government wanted time to negotiate a backroom deal with Tshisekedi.

“A Tshisekedi presidency would be the least bad alternative to a Shadary victory for the regime as it would put a veil of legitimacy on the electoral process and would be more manageable than a Fayulu presidency,” Van Houtte said.

Felix Tshisekedi gestures as he is surrounded by his wife and supporters after he was declared winner of the election. Photograph: Caroline Thirion/AFP/Getty

Robert Besseling, executive director of the risk consultancy EXX Africa, said Kabila had decided not to risk announcing a Shadary victory.

“Instead, he chose to split the opposition by creating a power-sharing deal … Kabila will be able to influence Tshisekedi, who now owes his ascendancy to power to Kabila’s control of the electoral commission,” Besseling said.

The last two elections, in 2006 and 2011, both of which were won by Kabila, were marred by bloodshed.

If Tshisekedi’s victory is confirmed in the next 10 days by the constitutional court, he would be the first leader to take power via the ballot box in the DRC since Patrice Lumumba, who became prime minister shortly after the DRC won its independence from Belgium in 1960. Lumumba was toppled in a coup and killed four months later.

Q&A Why is the DRC election so important? Show The Democratic Republic of the Congo's sheer size, its political history and its myriad problems are all reasons why observers have followed its election so closely. The vast, resource-rich country, with a population of 80 million spread over an area the size of western Europe, has never known a peaceful transition of power since its independence from Belgium in 1960. It remains one of the poorest places in the world, racked by war and disease and with massive inequality. In the east, where scores of militia commanders battle for control of mines, an outbreak of Ebola has killed more than 300. Countrywide an estimated 4.3 million people are displaced. It is still recovering from a civil war triggered by the fall of the dictator Mobutu Sese Seko in 1997, in which 4 million people died. Joseph Kabila has been in power as president since his father, Laurent-Désiré Kabila, the victor of that conflict, was shot dead in 2001. The country’s problems have been exacerbated by the refusal of Kabila to leave power after the end of his second mandate two years ago, which is why December’s much-delayed election was invested with so much hope and trepidation. Chaos at polling stations on the day of the vote dampened hopes that the election would bring a measure of political stability. The announcement by the electoral commission on 10 January that Felix Tshisekedi had won confounded polling that had put another opposition figure well in front and raised fears of a backroom deal ultimately keeping Kabila in power. Photograph: Stefan Kleinowitz/EPA

Kabila, 47, has ruled since the 2001 assassination of his father, Laurent Kabila, who overthrew the long-serving dictator Mobutu Sese Seko in 1997.

The DRC suffers from widespread corruption, continuing conflict, endemic disease, and some of the world’s highest levels of sexual violence and malnutrition. It is also rich in minerals, including those crucial to the world’s smartphones and electric cars.

Kabila’s second electoral mandate expired in 2016 and he only reluctantly called new elections under pressure from regional powers. The constitution forbade him from standing again and critics claimed he hoped to rule through Shadary, who has no political base of his own.

However, the opposition was weakened by internal arguments and the exclusion by the electoral commission of two political heavyweights: Jean-Pierre Bemba, a former warlord, and Moïse Katumbi, a popular tycoon.

Tshisekedi’s father, Étienne, was a famous opposition leader under Mobutu. He died in 2017 and his son has inherited his party. Critics say Tshisekedi, 55, is unproven, inexperienced and lacks the charisma of his father. “His father was a man of the country. The son is very limited,” Valentin Mubake, former secretary-general of Tshisekedi’s Union for Democracy and Social Progress told the Guardian last month.