Many Mauritanians are born into slavery

The new law also stipulates that anyone found guilty of promoting or being an apologist for slavery could face two years in jail.

A Mauritanian anti-slavery group, SOS Slavery, welcomed the law as a victory for the people of Mauritania.

Slavery persists in parts of Mauritania even though it was banned in 1981.

A presidential decree abolished the practice, which has existed for centuries in Mauritania, but no criminal laws were passed to enforce the ban.

Human rights groups say despite official denials the practice continues and is widespread.

'Important change'

Boubacar Ould Messaoud, leader of SOS Slavery, said the law was very important for the country.

We did all the hard work for our master and all we received in return was beatings

Mohamed

escaped Mauritanian slave

Mauritania's best kept secret

"We have been demanding this law for a very long time and we are very happy that the National Assembly has passed this law.

"We now have legislation which not only defends slaves, but punishes the practice of slavery. It is an important change."

SOS Slavery says there could be up to 600,000 slaves - many of them used as bonded labour - in Mauritania.

That would add up to 20% of the population although the BBC's Ed Horton says those figures are difficult to verify.

Before the new law was passed, the Anti-Slavery International group welcomed the Mauritanian government's initiative but said the proposed law was too weak.

The group urged the government to include contemporary aspects of slavery - such as forced marriage, indentured labour or debt bondage.

And the organisation said the maximum jail term should be 30 years and new laws should allow for reparation payments to the victims.