* UN urges opposition to file appeal for recount
* Bongo says constitutional court should decide on recount
* Rival questions court's neutrality
* Bongo family have ruled oil-rich state for 49 years
By Gerauds Wilfried Obangome
LIBREVILLE, Sept 8 (Reuters) - Gabon's opposition faced a legal deadline on Thursday to seek a vote recount in an election they say was stolen by President Ali Bongo, whose family has ruled the oil-rich OPEC member state for about half a century.
Results last week showed Bongo, 57, beat his main rival Jean Ping, a veteran diplomat, by fewer than 6,000 votes in the Aug. 27 poll, prompting days of violent riots during which at least six people died.
Bongo has rejected accusations that results were altered to ensure his victory but has come under increasing international pressure to back a recount of votes, including from former colonial power France, which has a military base in Gabon.
The United Nations has urged the opposition to lodge an appeal with the constitutional court before the 4 p.m. (1500 GMT) deadline.
Ping, 73, has repeatedly questioned the neutrality of the court and could not immediately be reached for comment on Thursday. However his campaign manager said Ping was weighing the option of officially challenging the result.
"We are currently studying the question. A decision has not yet been taken," said John Nambo.
International criticism of the election has focused on the results from Bongo's stronghold, the province of Haut-Ogooue, where the participation rate was more than double that of other regions and showed that 95.46 percent of voters backed Bongo.
The European Union has said it found anomalies in the results from Haut-Ogooue and on Thursday France renewed its call for a recount.
"France considers that a transparent, impartial examination of the results of the presidential election is a condition for ending the crisis as it's the only way to establish the sincerity of the result incontestably," said French foreign ministry spokesman Romain Nadal.
MEDIATION
As well as its military base, France has about 14,000 nationals based in Gabon and, through its oil giant Total TOTF.PA , a large stake in the country's oil sector, which produces 200,000 barrels per day.
But Paris has ruled out intervening in Gabon's post-electoral crisis as it has done before in its former colonies, saying it is up to Africans to resolve it.
African Union mediators, led by Chad's President Idriss Deby, are expected to arrive in the Gabonese capital Libreville on Friday to help find a solution to the standoff.
Some analysts have questioned whether Deby, one of Africa's "big men" in power since 1990, will push for a recount.
A power-sharing deal in Gabon is also seen as unlikely, partly because of the personal nature of the feud between the two candidates.
Bongo has accused the opposition of cheating in its turn and said on Wednesday he would ask the constitutional court to investigate irregularities in Ping's stronghold and elsewhere.
Critics of Bongo, who won a disputed election in 2009 after the death of his long-ruling father Omar Bongo, say he has not done enough to redistribute oil wealth beyond a small elite.
The ruling Gabonese Democratic Party (PDG) has suffered a series of high-level defections in recent years.
Ping, a life-long political insider and former African Union Commission chairman, was a close ally of President Omar Bongo but fell out with his son and resigned from the PDG in 2014. He has fathered two children with Ali Bongo's sister Pascaline.