Gabon's national assembly in Libreville was set ablaze on the evening of Wednesday 31 August by angry demonstrators. People gathered on the streets after an announcement was made that President Ali Bongo had been re-elected, witnesses said.

"The whole building is catching fire," a man at the dramatic scenes, who gave his name as Yannick, told AFP. Plumes of smoke billowing above the building could be seen by AFP journalists.

Firemen arrived at the scene attempted to put out the blaze, an eyewitness told Reuters. But the building was still on fire as flames could be seen from a distance as darkness fell on Libreville.

Social media such as Facebook and Twitter were blocked, said residents in the capital. Many locals had stockpiled food in case of unrest following the election results.

Violent clashes broke out in Libreville, the country's capital, after news that President Ali Bongo had been re-elected by just under 6,000 votes.

Supporters of the opposition candidate Jean Ping have accused Bongo of stealing the vote, according to Al Jazeera, and 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".

"This victory by such a tight score obliges ... each of us to respect the verdict of the ballot box and our institutions," Bongo said a written speech distributed to reporters.

"Our country is advancing and that advance must take place with the unity and peace so dear to the Gabonese people."

Some demonstrators vandalised a shopping centre and looted a bank, witnesses told AP. Protesters in other districts also were thought to have pillaged and burned buildings, while army helicopters circled above.

Teargas was fired by security forces to dispel the crowd who were trying to gain access to the electoral commission headquarters in Libreville. Blanche Simmony, a Jean Ping supporter told the BBC that thousands of people had congregated at the opposition HQ before heading towards the commission building.

Commission delegates representing the opposition walked out of the vote count and declined to sign papers endorsing Bongo's victory, said a BBC reporter in Libreville.

"It's going to be difficult to get people to accept these results," one member of the electoral commission told AFP. "We've never seen results like these, even during the father's time," he added.