Mauritanian President Mohamed Ould Abdel Aziz arrived at a military hospital outside Paris on Sunday for treatment after being wounded when an army unit fired on his convoy earlier in the day.
Government officials said soldiers mistakenly opened fire on the president after failing to recognise his car.
However, a military source said earlier that the president had been directly targeted, without giving any indications as to the identity of the attacker or the motive.
"This was an accidental shooting on the presidential convoy as it returned to Nouakchott. The army unit did not recognise the presidential convoy," Communications Minister Hamdi Ould Mahjoub said on national television.
Abdel Aziz appeared on television from his hospital bed before flying out of the country, telling Mauritanians that the surgery carried out after the shooting had been a "success".
"I want to reassure them about my health after this incident, which was committed in error by a military unit," he said.
Earlier, a security source told AFP that Abdel Aziz was hit in the arm by a bullet that an unknown gunman fired at him as he was driving from his weekend retreat in nearby Tweila. Other reports said Aziz received a bullet wound to the abdomen.
"The president's life is not in danger, he got out and walked to a military hospital where he received first aid," the source said.
The hospital was placed under high surveillance by the presidential guard.
'Difficult to understand'
FRANCE 24’s correspondent in the Mauritanian capital of Nouakchott, Laurent Prieur, said the circumstances surrounding the incident were still unclear.
“The official government stance is that the army mistakenly shot an unmarked car that they did not recognise as the president’s car, but at this point that is difficult to understand,” Prieur said.
Opposition lawmakers accuse the former general of despotism and mismanagement and having failed to heed commitments made in the Dakar accords that led to his election in 2009, a year after he seized power in a coup d'état.
The opposition wants a transition government to take over from Abdel Aziz and find a way out of the crisis, dealing with issues such as unemployment, slavery and attacks on human rights.
Abdel Aziz has insisted he will not resign, despite a series of opposition protests.
"I have no intention of leaving power because I think that in a democracy, change must be done through the ballot box," Abdel Aziz said in August.
He has led a military campaign against Al-Qaeda in the Islamic Maghreb (AQIM).
He has been the subject of several failed assassination attempts by AQIM, Al-Qaeda's franchise in North Africa, according to sources.
AQIM, which stems from a group started in the late 1990s by radical Algerian Islamists, formally subscribed to Al-Qaeda's ideology in 2007, but after a string of high-profile attacks, the Algerian army managed to severely curtail its operations.
It has since been boosted by the turmoil in neighbouring Mali that followed a coup there in March, with hard-line Islamists occupying the country's vast northern region.
Abdel Aziz's mandate expires in 2014.
(FRANCE 24 with wires)