Mauritania passed a law promising prison time for people who keep slaves — a monumental step in the northwest African nation's push to eliminate the long-standing practice.

The law, adopted unanimously late Wednesday by Mauritania's legislature, calls for prison sentences of up to 10 years for people found keeping slaves, and reparations for those who have been enslaved.

Slavery has existed for hundreds of years in Mauritania — a poor nation of Muslim nomads and traders on the Sahara Desert 's. Yet it has been hard to know how persistent the practice is because owners and slaves often have lived together for decades and consider one another to be family.

The government officially abolished slavery in 1981, but no one has ever been prosecuted for it and no law created a punishment.

"It's a historic moment for Mauritania," said Boubacar Ould Messaoud, president of the anti-slavery activist group SOS Slavery. "We are very happy, the democrats won this battle."

Messaoud credited Mauritania's newly elected president — the first to take power since a military junta seized power in a 2005 coup — with backing the law and prioritizing slavery's abolishment.

A new openness about slavery has been growing in Mauritania since the coup. Junta head Col. Ely Ould Mohamed Vall publicly declared slavery a problem in May 2006, a sharp break from years of denials by deposed President Maaoya Sid'Ahmed Ould Taya.

The new law also makes any "cultural or artistic work defending slavery" punishable with two years in prison, and makes it an offense for governmental authorities not to pursue slaveholders.