Mauritanian police have beaten protesters who had taken to the streets of the capital against the ruling military.
Scores of residents loyal to Sidi Mohamed Ould Cheikh Abdallah, the president ousted in August, flocked to Nouakchott's main hospital on Sunday chanting: "Long live Cheikh Abdallahi."
Security forces using tear gas broke up the demonstration and small groups of protesters reassembled in other parts of the city.
Senior military personnel seized power at the beginning of August after Abdallahi had announced he was dismissing them.
All public demonstrations have since been outlawed, but Sunday's protest came a day before Abdallahi was due to be released from detention under an African Union ultimatum.
Mauritania risks sanctions if it fails to let him go.
One protester said: "I wish the soldiers were on the borders defending the country instead of assuming they have the right to ride roughshod over the fundamental right to demonstrate."
Other protesters chanted: "No to dictatorship, long live democracy."
Protesters came from the National Front for the Defence of Democracy (FNDD).
Abdallahi had been democratically elected and had received the support of the military, but he has remained under house arrest since the coup.
No date has been set for elections despite pledges by the army generals to act quickly to restore democracy.