This is not the first time that slavery has been outlawed in Mauritania. It was first declared illegal in 1905 and as recently as 1981.

But previous abolitions have been ineffective. Although numbers are difficult to establish, the Mauritanian advocacy group, SOS Slavery, estimates that as many as 600,000 people – about 20 per cent of the population – in the arid West Africa country could be enslaved.

In the past, the Mauritanian government adopted an ambiguous stance. At times, it denied that slavery existed. Activists were unlikely to receive cooperation, and the use of the word ‘slave’ was discouraged.

The new government of President Sidi Ould Cheikh Abdellahi (installed in April) has tried to change this. Mauritania’s new arrangements make provision for prison terms of 10 years for slaveholders. Promoting or defending slavery carries a two-year term. Slavery is, in theory at least, illegal and punishable. Slavery is now near-universally acknowledged as an appalling violation of human rights – indeed, denial of the right to live free is arguably the greatest human rights violation of all.

It is also one depressingly common to cultures throughout history. But changing laws alone is not enough. If Mauritania is to deal with it effectively, some lessons can be learned from history. Acknowledgement that slavery exists represents a notable advance. One study notes: “The most important lesson of all past interventions is that you can’t fight slavery if you don’t name it ‘slavery’.”

For Mauritania’s ban on slavery to succeed, it must ensure that laws against slavery are enforced. The trans-Atlantic trade was abolished in the British Empire in 1807. The British Navy – then the world’s most powerful – attempted to intercept slave-carrying vessels, and enslavers faced arrest and punishment.

Mauritania, one of the world’s poorer countries, will need to find the personnel and legal capacity – police, prosecutors and government inspectors – to enforce the law. It must also back change in law with change in culture and values. The British abolitionists fought a long campaign to convince people of the immorality of slavery.

This was ultimately successful: The common view slowly changed, leading a slavery supporter to comment glumly that “the stream of popularity runs against us”. Abolitionists pursued this through petitions and boycotts, and appeals to religious convictions the population. Periodic slave rebellions testified to their case.

According to Mauritanian activists and ex-slaves, the institution is so deeply woven into culture that slaves need little coercion: In the words of Mr Boubakar Messaoud of SOS Slavery: “We have achieved what the American plantation owners dreamed of – the breeding of perfectly submissive slaves.”

One slave told an interviewer: “God created me to be a slave, just as He created the camel to be a camel.” These views must change. Unless freed slaves are helped to become self-sufficient, their future will be abject poverty. Opportunities in Mauritania are limited, and slaves have little education.

Former slaves face a stark choice upon emancipation: To go to the streets with no money or stay with their owners on whatever terms. Most choose to stay. In the US, slaves became “sharecroppers” who worked small plots on landowners’ estates, were paid a pittance – if at all – and kept in perpetual debt through charges for food, clothes and supplies.

Previous emancipation in Mauritania failed largely because steps were not taken. This one will be nothing more than a re-branding exercise unless laws and enforcement change the slave-master relationship. The government should provide literacy and skills training to give freed slaves a chance to make use of their freedom.