By Gerauds Wilfried Obangome

LIBREVILLE (Reuters) - Gabon's main opposition parties chose former foreign minister Jean Ping as their candidate in an election on Aug. 27 against President Ali Bongo, who is standing for a second term.

Ping, aged 74, is considered one of Africa's foremost diplomats. He has served as chairman of the African Union commission and as president of the U.N. General Assembly.

"I understand the gravity of the task I have been given," Ping told thousands of cheering supporters in Libreville. "I won't disappoint you."

Ping has an unusual history for an African politician. His father was a Chinese businessman who came to Gabon in the 1930s, married the daughter of a traditional chief and grew rich trading goods including timber and seafood.

Ping came to wealth and prominence as an ally and protege of Omar Bongo, the father of Ali Bongo. But he fell out with the son and resigned from the ruling party in 2014 to become a vehement government critic.

He faces an uphill task in a contest with Bongo, who came to power and won an election in 2009 when his father died in office after 42 years in power.

Bongo retains institutional advantages accrued over the decades his family has held power as well as a close connection to France, the country's former colonial power, which plays a significant role in the country's economic life.

The opposition says the one-round electoral system also favors the president, who is known locally as "Bongo fils", or Bongo junior. The government denies this.

With the state machinery and entrenched patronage networks behind him, Bongo and his Gabonese Democratic Party (PDG) are likely to win the election, even though a slump in global oil prices has hurt the economy and slashed revenue in Gabon, one of Africa's leading oil-producing nations.

With a GDP per capita around $10,000 a year, Gabon is substantially richer than most sub-Saharan African countries, but frustration over wealth inequality and political rivalries could spill over into unrest in this election.

Opponents have sought to discredit Bongo, in some quarters by casting doubt on whether he is really Gabonese or an adopted child from eastern Nigeria, a charge he has vehemently denied.

Addressing a rally on Saturday for the opening of Gabon's electoral campaign, Bongo responded to the allegation, saying: "the burden of proof rests on the one who makes the accusation."

"The truth of the matter is they are afraid ... because they don't have a good program," he said.

(Writing by Matthew Mpoke Bigg; Editing by Tim Cocks, Larry King)