Supporters of Gabon's opposition leader Jean Ping have clashed with security forces in the capital Libreville, after incumbent President Ali Bongo was named the winner of a closely fought presidential election.

Moments after the poll results were announced by the interior ministry on Wednesday, anti-government protesters shouting "Ali must go!" tried to storm the offices of the election commission, according to AFP news agency.

Security forces used tear gas and stun grenades to push several hundred protesters back.

Bongo won 49.80 percent of Saturday's vote, against 48.23 percent for Ping, a narrow margin of only 5,594 votes of a total 627,805 registered voters, according to officials results announced by the interior ministry.

Gabon election: Wage gap a key issue for voters

Election commission members belonging to the opposition immediately denounced the result, with one commissioner for Ping's party, Paul Marie Gondjout, saying the vote had been "stolen".

"They say [Ping's camp] they will not accept this result at all," Al Jazeera's Catherine Soi, reporting from inside the compound housing the electoral commission in Libreville, said.

"Protesters came right outside this compound; many of them lighting tyres and chanting anti-government songs," our correspondent said.

"They were dispersed by the police," adding that explosions could be heard in the distance.

Earlier, clouds of smoke and tear gas could be seen over parts of the city where clashes were taking place.

"Jean Ping has been telling his supporters not to accept a vote that is not favourable to him ... He is telling his people to defend their vote, to defend their choice," Soi said.

"They say that they have been cheated."

Witnessed also told The Associated Press news agency that some demonstrators vandalised a shopping center and looted a bank. Protesters in several districts also looted and burned other buildings, as army helicopters flew overhead.

'Never seen results like these'

Presidential elections are held in a single round in Gabon, with the candidate with the most votes winning outright. The constitutional court now must finalise the provisional results.

Any appeal by Ping would be likely to focus on disputed results in one of the country's nine provinces - the Haut-Ogooue, where Bongo won 95.5 percent of the vote. Results from the province showed a turnout of more than 99 percent, compared with a nationwide turnout of 59.46 percent.

"It's going to be difficult to get people to accept these results," one member of the electoral commission told AFP, asking not to be named because of the sensitivity of the subject.

"We've never seen results like these, even during the father's time," he added.

Opposition delegates in the electoral commission boycotted a vote to approve the results on Wednesday and they have vowed to fight for a recount.

A spokesman for Bongo's campaign, Alain-Claude Bilie-By-Nze, called the vote "free, democratic and transparent", according to AP.

Second term

Bongo, 57, has now won a second term as head of the tiny oil-rich state, previously ruled for 41 years by his father, Omar. 

In 2009, Bongo was declared winner of the presidential election after his father's death. The result was disputed and in the ensuing clashes several people were killed, buildings looted and the French consulate in the economic capital Port-Gentil was torched.

READ MORE: Jean Ping lays claim to Gabon presidency win

Prior to becoming Bongo's bitter rival, Ping, a 73-year-old career diplomat well known on the international scene, worked with Bongo senior for many years. 

Before the interior ministry's announcement, the European Union, which monitored the election, renewed a call for Gabon to publish "detailed results" for every polling station, urging all actors to help keep peace.

"We invite all stakeholders to exercise restraint, work to maintain civil peace in the post-electoral context and make use of legal channels to resolve any dispute," the EU said.

Source: Al Jazeera News and agencies