The authorities said they had not given permission for the demonstration
Police in Mauritania's capital have used tear gas to disperse scores of protesters calling for the release of the president ousted in August's coup.
The demonstration came ahead of the African Union's Monday deadline for Sidi Mohamed Ould Cheikh Abdallahi to be freed and restored to power.
The AU has already suspended Mauritania's membership over the coup and has warned of further sanctions.
But the army coup leader has dismissed the AU's demand as unconstructive.
General Mohamed Ould Abdelaziz has appointed a transitional government to stay in power until new elections, to be organised in 14 months time.
Sunday's protest came in defiance of a ban on demonstrations imposed by the country's military rulers.
Sidi Mohamed Ould Cheikh Abdallahi is being kept under house arrest
Local journalist Hamdi Ould Mohamed el Hacen told the BBC's Network Africa programme that police used tear gas and bludgeons to disperse the protesters, but no arrests were made.
He says Mr Abdallahi, who became Mauritania's first democratically elected leader in 2007 after a coup two years earlier, also partly instigated by Gen Abdelaziz, is believed to be in good health.
He is being kept under house arrest in a villa in the capital, Nouakchott, the reporter says.
But the military junta say they will never consider Mr Abdallahi's return to power.
The BBC's Elizabeth Blunt in Addis Ababa, where the African Union is based, says the continental body is trying hard to shake off its old image as a "dictators' club".
It wants to enforce at least some minimum standard of constitutional legitimacy for its members and it has already had one success, she says.
When the long-standing president of Togo, Gnassingbe Eyadema, died, his son was hastily sworn in to succeed him.
There was such an outcry that the young Faure Gnassingbe was persuaded to go through a form of election before assuming power.
Judging by that election, the standard of democracy demanded by the AU is not very high - but even so, Mauritania's new rulers seem unwilling to compromise, our reporter says.
Rafiq Hajat, executive director of the Malawian-based think tank Institute for Policy Interaction, says the generals are unlikely to be worried by its censure.
The organisation can apply diplomatic pressure through donors, but military action is extremely unlikely given its limited resources, he says.
"The ultimate decision is not with the AU, it's not with America, it's not with the EU, it is with the people of Mauritania and what they desire," Mr Hajat told the BBC.