Some shouted demands for a boycott of Danish products, while others carried banners with slogans such as "We will protect the Prophet Mohammad and we will sacrifice ourselves for him."
"We are against those Westerners who insult the Islamic world with these cartoons," said one of the demonstrators, 25-year old student Mohamed Ould Abderrahmane.
"We should wage jihad on them," added one of his fellow students, Alpha Sow, 27.
The initial publication of the cartoons two years ago led to protests and rioting in Muslim countries around the world, in violence which killed at least 50 people.
Danish newspapers reprinted the cartoons this month, in solidarity with the paper that first published them, after police arrested three men on suspicion of plotting to kill a cartoonist who drew one of the images.
The vast majority of Muslims in Mauritania, an Islamic Republic straddling black and Arab West Africa on the western edge of the Sahara desert, are followers of the moderate Maliki school of Sunni Islam.
Experts say Salafism, a conservative ideology linked to the strict Wahhabism of Saudi Arabia, has also made inroads.
Mauritania arrested one of Saudia Arabia's most wanted Islamists, Abdallahi Ould Mohamed Sidiya, in January. Some of the suspects arrested for the killing of four French tourists in Mauritania on Christmas Eve have said they belong to al Qaeda.