LIBREVILLE (Reuters) - Gabonese opposition candidate Jean Ping declared himself president on Friday, after a disputed election that triggered two days of post-election riots against President Ali Bongo.

Violence erupted across the Central African country on Wednesday following the announcement of a slim victory for Bongo, who was first elected in 2009 after the death of his father Omar, Gabon’s president for 42 years.

But Ping says the poll on Saturday was a sham.

“I am the president,” Ping told a news conference after being freed from his headquarters, which had earlier been surrounded by Gabonese security forces.

“The whole world knows who is the president of the republic: it’s me, Jean Ping,” he said. “Our country is moving toward chaos ... Peace can only occur if the truth of the ballot box is restored and respected.”

Five people died in the ensuing unrest, Bongo’s spokesman Alain-Claude Bilie By Nze said on Friday, and up to 1,100 arrests had been made by Thursday, according to Gabon’s interior minister.

Ping called upon the international community to intervene, but analysts said intervention from abroad was unlikely as was a widespread people power revolution to unseat Bongo.

“It looks like the result will stand,” NKC African Economics’ head of research, Francois Conradie, said. “But Bongo has lost legitimacy and will face an unruly labour environment for his next term,” referring to possible strikes.

Traffic resumed on Libreville’s wide waterfront avenues on Friday, occasionally veering to dodge litter or burnt tyres. Some shops reopened and residents queued to buy food.

Slideshow ( 5 images )

Television stations, supermarkets, shops and homes were looted in Libreville on Wednesday and Thursday. Unrest broke out in other cities and in rural areas as well.

“I’m sad for my country because such things should never happen,” National Assembly President Richard Auguste Onouviet said as he surveyed the damage at the parliament building, whose assembly hall was gutted by arson on Wednesday.

In some suburbs of the capital, residents said they had formed small self-defence groups against looters.

“We cannot take this anymore and we are stopping the vandals,” said Stephane Mounanga, 44, from the suburb of Dragage.

The Bongos have long relied on patronage to buy off dissent. But falling oil prices and production, long dominated by Total and Shell, have led to budget cuts in a country where many citizens have not enjoyed the fruits of oil wealth.

Soldiers were positioned at crossroads on Friday and the elite Republican Guard ensured security near the presidential palace. Riot police were also on the streets.

NO INTERVENTION

A group of Ping’s supporters had been holed up inside his headquarters on Friday before being released, as demanded by French Foreign Minister Jean-Marc Ayrault, who said France was working with partners to find a quick solution to the crisis.

Slideshow ( 5 images )

Two people died when the building was first attacked on Wednesday night, according to Ping’s camp.

Ping, a former diplomat and African Union Commission chairman, is a lifelong insider to Gabonese politics who fathered two children with Omar Bongo’s daughter, Pascaline, but later fell out with Ali Bongo and resigned from his party in 2014.

France, the United States and the European Union have urged the authorities to release individual polling station results, a request Bongo’s spokesman rejected on Thursday.

Interviewed on Friday on France 2 television, Ayrault repeated the call for more transparency as regards the election results, but ruled out intervening in Gabon, home to 14,000 French citizens.

“We are Africa’s partners, but we do not want in any case to intervene in countries’ internal affairs. That would be disrespectful of Africans,” he said.

France has had a military base in Gabon since independence in 1960 and 450 troops are stationed there, according to the French Defence Ministry.

France intervened in the Ivory Coast in 2011 under a U.N. mandate to help oust then-president Laurent Gbagbo after he refused to accept defeat in a disputed election. More recently it has intervened in Libya, Mali and Central African Republic.

During more than four decades in power, Omar Bongo cultivated close relations with a succession of French presidents, but Ali Bongo’s ties to Paris have been more tenuous.

Gabon recalled its ambassador to Paris in January after France’s Prime Minister Manuel Valls appeared to question the legitimacy of Bongo’s 2009 election.