The shooting late on Saturday set the coup-prone northwest African country on edge and President Mohamed Ould Abdel Aziz appealed to Mauritanians to keep calm in a televised message from his hospital bed.
Although Mauritania has been stable politically since Mr. Abdel Aziz seized power in 2008, it lies on the fringes of the Sahara Desert where Islamist gunmen hold increasing sway.
"I want to reassure everyone about my state of health after this incident committed by error," Abdel Aziz said from his bed. "Thanks to God, I am doing well."
He was covered in a sheet up to his neck and the extend of the wounds was not clear. Medical sources said he had been shot in the abdomen.
The president had been flown to France – the former colonial power – for further treatment, communications minister Hamdi Ould Mahjoub told Reuters.
Abdel Aziz was wounded late on Saturday when a military patrol opened fire on his convoy about 40 km (25 miles) from the capital, Nouakchott, the government said. He was driving from the town of Toueila, where he has a ranch.
Officials did not say what had happened to the soldiers who had opened fire on the convoy.
Mauritania launched numerous military operations on Islamist bases in neighboring Mali before a rebellion split that country in two in March, leaving much of it in the hands of heavily-armed groups linked to Al Qaeda.
Abdel Aziz was elected in 2009 after seizing power a year earlier in a coup that cut short the rule of Mauritania's first democratically elected president, who had reached out to Islamists.
Split between black and Arab Africa, Mauritania is bigger than Turkey but has only 3.5 million people. The largely desert country produces oil from wells offshore. Its other main export industries are mining and fishing.