* French PM seemed to cast doubt on Bongo's 2009 election win
* Gabon's opposition disputed the election
* Not the first spat between Gabon and former colonial ruler (Adds analyst comment)
By Gerauds Wilfried Obangome
LIBREVILLE, Jan 18 Gabon said it recalled its ambassador to Paris after France's prime minister appeared to question the legitimacy of President Ali Bongo's election in 2009.
The latest sign of fraying relations between Gabon and its former colonial ruler follows a French investigation into the origins of the wealth of the Bongo family, which has ruled the oil-producing west African nation since 1967.
Asked during a television interview on Saturday whether Bongo had been democratically elected, Prime Minister Manuel Valls said: "No, not as I understand it."
Gabon's opposition disputed the election result at the time.
Bongo, who succeeded his father Omar, is expected to seek a second seven-year mandate in August and will run against one of his main critics, Jean Ping, a former African Union chairman. .
Francois Conradie, analyst at South Africa-based NKC African Economics, suggested Valls' comment could boost the opposition's chances.
"Mr Valls' undiplomatic exclamation has spread like wildfire in Gabon, and has further damaged Mr. Bongo's public image," he said in a note on Monday, while noting Ping's candidacy also had its critics.
Gabon's Interior Minister Pacome Moubelet Boubeya told state television late on Sunday the government was seeking clarification of Valls' remark.
"We are surprised and shocked by the words of Manuel Valls when our two countries have such excellent relations," he said.
France's foreign ministry said it was "extremely attached" to its relationship with Gabon under Bongo's presidency.
Ministry spokesman Romain Nadal told reporters that the ambassadors of both countries had met government representatives in each capital on Monday, "to remove any misunderstanding".
Gabon has twice before recalled, and then reinstated, Ambassador Germain Ngoyo Moussavou in recent years.
For decades after Gabon's independence in 1960 the two countries were close allies under the "Francafrique" system that gave veteran African leaders security guarantees in exchange for business deals.
Gabon is one of Africa's richest countries but wealth is very unevenly distributed.
France remains a key player in Gabon's economy, with more than 100 companies based there, including oil major Total .
It also has a military base in the capital Libreville with more than 400 French soldiers. (Reporting by Gerauds Wilfried Obangome and John Irish in Paris; Writing by Emma Farge; Editing by Robin Pomeroy and John Stonestreet)