KINSHASA (Reuters) - In Kinshasa’s lush Botanical Garden, the scene was set to celebrate the election of the man Joseph Kabila had chosen to replace him as president of the Democratic Republic of Congo.

FILE PHOTO: Men remove an electoral campaign banner of Emmanuel Ramazani Shadary, former Congolese interior minister and presidential candidate, in Kinshasa, Democratic Republic of Congo, January 2, 2019. REUTERS/Baz Ratner/File Photo

Emmanuel Ramazani Shadary’s face beamed from yellow and blue banners, some emblazoned with the words “Shadary President.” Soda bottles were piled up in a corner as Kabila’s ruling coalition tallied results of that day’s election at a nearby hotel.

Within hours of polls closing on Dec. 30, the planned festivities at the gardens were abruptly called off.

As the results poured in from observers and thousands of electronic voting machines, it became clear to Kabila’s camp that opposition leader Martin Fayulu had won by a decisive margin, diplomats and Congolese sources with direct knowledge of the events said.

Fraught discussions began in Kabila’s team over whether to engineer a win for Shadary, a former interior minister, or anoint a different opposition candidate who might be willing to protect the political and financial interests of Kabila and his associates, the sources said.

A week later, the electoral commission announced the election had been won by Felix Tshisekedi. Fayulu said he was a victim of fraud and the Catholic Church, which had a 40,000-strong team of election observers, rejected the official result.

Aides to Kabila, who succeeded his slain father in 2001, and Tshisekedi denied there was any tampering with the election results, as did the head of the commission charged with overseeing the poll.

“The results are those we announced,” said Corneille Nangaa, president of the National Independent Electoral Commission. “The rest is politics and useless speculation.”

Barnabe Kikaya Bin Karubi, a Kabila adviser, rejected the allegations of rigging as “pure speculation” and Jean-Pierre Kambila, Kabila’s deputy chief of staff, denied the president’s camp ever considered trying to rig the vote in Shadary’s favor.

“This is pure imagination,” he said. “These are (accusations from) people who have lost and don’t want to accept the reality.

But a Congolese source, who was in direct contact with senior government officials and members of the electoral commission as the debate unfolded, told Reuters that Kabila and his advisers realized quickly that the game was up.

“Shadary’s defeat was so blatant that not even the most sophisticated of the rigging was going to turn the results in his favor,” he said. “This is when Plan B kicks in: Felix President.”

FEAR OF VIOLENCE

Kabila’s aides feared that a Shadary win could provoke a violent backlash from opposition supporters who dominate in Kinshasa, the capital, and in several eastern regions of Congo, source of much of the country’s vast mineral wealth.

A Tshisekedi win, on the other hand, would be more likely to garner international approval and might help keep the opposition divided, the source said.

Slideshow ( 2 images )

Accusations of vote rigging are not new to elections in Congo. Foreign powers have overlooked alleged irregularities in the past for the sake of insuring relative stability in a country where two wars in the 1990s and early 2000s sucked in other regional armies.

But the scale of the alleged cheating in December’s election stoked fears that the long-delayed vote, which was meant to lead to Congo’s first democratic transfer of power in 59 years of independence, could degenerate into renewed street fighting or regional conflict.

The African Union and Southern African Development Community held emergency meetings in the Ethiopian capital, Addis Ababa, on Thursday, to discuss the election. The African Union called for the final results to be postponed, citing “serious doubts” about their credibility. But the Congolese government rejected the call on Friday.

The U.S. government, which has already sanctioned a number of top Kabila officials, has said it will hold accountable those undermining the democratic process.

Fayulu -- who was backed by Kabila’s two fiercest political rivals, Jean-Pierre Bemba and Moise Katumbi -- has called the result a “coup” and filed a challenge at the constitutional court. The court was expected to rule on the case by Saturday.

A member of Fayulu’s camp shared figures with Reuters that he said were leaked from the electoral commission’s server and showed its candidate with 59.4 percent of the vote, compared to just under 19 percent for both Tshisekedi and Shadary.

The figures were similar to those contained in a report by the Catholic Church bishops’ conference in Congo, seen by Reuters, which was based on results collected by its observers.

Neither of the sets of figures is complete, and Reuters could not independently authenticate them.

“WE CAN ALWAYS CHEAT”

In a change from elections in 2006 and 2011, Congolese authorities introduced electronic voting machines for the latest poll.

The opposition feared the machines would be used to rig the vote but the government said it was a more efficient way to collect and transmit votes in the country of 80 million people.

Voters entered their selections on iPad-like devices, which were equipped with sim cards that allowed the final tallies to be transmitted via mobile phone networks to election organizers in Kinshasa as soon as the polls closed.

The government ordered internet services cut on the morning of Dec. 31, saying this was necessary to preserve public order after “fictitious results” began circulating on social media.

But by that time, figures had reached Kinshasa from most of the more than 60,000 polling stations, three Congolese sources and three diplomats briefed by election officials said.

Kabila’s coalition, the Common Front for Congo, also had observers who recorded results at individual polling stations and sent them via phone, email or text messages for tallying at a Kinshasa hotel.

By the early hours of Dec. 31, their figures showed Shadary losing heavily to Fayulu.

“He is beating us everywhere,” one coalition official wrote in a message seen by Reuters. “We don’t organize elections to lose them. We can always cheat.”

Two diplomatic sources said an election commission official told some foreign envoys in Kinshasa of Fayulu’s victory within days of the vote but said it was too dangerous for the body to announce it.

Two other diplomats said commission officials made clear to them that Shadary had lost but said they were not informed of the winner.

“The government did not immediately abandon the Shadary option. However, they understood that it was going to be very difficult to make the population accept a Shadary victory,” a Kinshasa-based diplomat said.

“SEMINAL ROLE” FOR KABILA

Representatives of Kabila sought a deal with Tshisekedi’s team, Kinshasa-based diplomats and Congolese sources said.

An agreement was reached, they said, under which Tshisekedi would be president, Kabila would be guaranteed protection for himself, his family and assets, and his supporters would retain significant control over parliament and the financial and security apparatus.

“What is certain is that Kabila will keep a seminal role,” a senior Congolese government official said.

Tshisekedi and Kabila’s camps deny such a deal was reached.

But Fayulu supporters question how members of Kabila’s coalition won over 70 percent of the votes in provincial and national legislative elections when official results show their candidate, Shadary, won just 24 percent in the presidential vote.

Top officials instructed Nangaa, the electoral commission chief, to award the vote to Tshisekedi, two Congolese government officials told Reuters. Denying this, Nangaa told Reuters that no one put pressure on him to change the results.

Kabila loyalists, especially in the military, did not trust Tshisekedi and wanted Shadary to be named president. They presented their concerns to Kabila’s aides at a meeting on Jan. 9, hours before the official results were announced early on Jan. 10, said a businessman with access to the presidency and a Western security official in touch with the Congolese military.

They said Kabila’s aides assured the loyalists they would retain their positions and their interests would be protected.