Updated

The government of this oil-rich African nation on Thursday declared the eldest son of the late dictator Omar Bongo the winner of weekend presidential elections, triggering a rampage in a coastal city and allegations of fraud.

Before the results of Sunday's election were announced on state TV, police fired tear gas at opposition demonstrators who camped outside the electoral commission in the capital overnight. The results had been expected Wednesday night but were delayed until Thursday morning because the election commission disagreed on how to review province-by-province results.

Within hours of the announcement by the country's interior minister, opposition supporters attacked the French consulate in the oil hub of Port Gentil, 100 miles (160 kilometers) south of Libreville, setting the building alight and ransacking nearby shops, two TV stations reported. Images of the burning consulate were shown on TV.

France, the former colonial ruler, was accused of propping up the Bongo regime. At the elder Bongo's funeral, French President Nicolas Sarkozy and his predecessor Jacques Chirac were jeered when they stepped from their limousines.

The demonstrators ransacked shops as they tore through the main market, carrying away refrigerators and TV sets. They also broke down the doors to the prison, liberating the prisoners, said local journalist Dianney Madztou.

Ali Bongo, the country's defense minister who campaigned from a private jet and plastered the capital with billboards, won with 41.7 percent of the vote, Interior Minister Jean-Francois Ndongou said. The top two opposition leaders — Andre Mba Obame and Pierre Mamboundou — were nearly tied, receiving 25.8 and 25.2 percent of the vote respectively. Obame owns a TV station, which lost its signal and was fired on earlier in the week.

Mamboundou, who spent the night flanked by supporters in a public square next to the election commission, called the election results "a fraudulent farce."

He said his party had tabulated the total results of individual polling stations and found that he had around 40 percent of the vote with Bongo snaring less than 30.

"It's not just a possibility of fraud. It's fraud pure and simple," Mamboundou said late Wednesday night, when the results were supposed to have been announced by Ndongou. "The Gabonese people do not want a dynasty. Forty-two years of President Bongo is enough. They want change."

Opposition leaders and hundreds of supporters camped out overnight in the main square flanking the election commission's office. They dragged a coffin into the square representing the death of the Bongo regime, which has ruled since 1967.

Police fired tear gas canisters Thursday morning as the election commission began announcing province-by-province results. Protesters scrambled away.

Bongo, 50, held senior posts for years in his father's Cabinet and was appointed foreign minister in 1989. Since 1999, he has been defense minister.

Eighteen candidates ran in the Sunday election, but former Prime Minister Cassimir Oye Mba dropped out the day of the vote, saying he feared the results could trigger postelection violence.

On Sunday, a television channel owned by Obame, inexplicably lost its signal. The station borrowed equipment to broadcast the election results but at around 3:30 a.m. Wednesday, masked men opened fire with artillery on the station, damaging its satellite uplink, the station's manager Franck Nguema told The Associated Press.

"This is an obvious attempt by the government to stop us from transmitting election results," he said.

Analyst Almami Cyllah of the International Foundation for Electoral Systems warned that the opposition would react badly if Bongo was declared the winner. As part of his campaign, the former president's son installed posters of himself every 30 feet (9 meters) on the capital's main highway and campaigned across the country from a private jet.

Cyllah expressed doubts about the legitimacy of the electoral roll of 800,000 registered voters in a nation of 1.5 million population where 40 percent of the population is under 15 and the voting age is 21.

Election Commission President Renee Aboghe Ella has acknowledged the voter list appears inflated and expressed concern that a winner may be declared without securing a majority, which "could create a problem of legitimacy." Unlike many African nations, in Gabon a candidate needs to only obtain the most votes to win, and not more than 50 percent of the vote.

Gabon is one of the continent's leading oil producers. The elder Bongo is accused of using the oil wealth on vanity projects such as a massive, marbled presidential palace and a little-used railroad instead of building much-needed infrastructure, like roads. He ran uncontested in some elections and dismissed allegations of fraud in others.