President Mohamed Ould Abdel Aziz of Mauritania was wounded in a shooting incident on Saturday.
Communications Minister Hamdi Ould Mahjoub said on television that a military patrol opened fire on the president's convoy by mistake.
He said the president was slightly wounded and walked into hospital without difficulty.
Mr Abdelaziz, aged 55, came to power in a military coup in 2008. He was elected president in elections held a year later.