Lawmakers in Ghana have passed a bill that prohibits the naming, accusing or labelling of another person as being a witch, with offenders facing up to five years in jail if found guilty.
It also prohibits people from practicing as a witchdoctor or a witchfinder.
The bill is a response to incidents of public lynching of people, especially the elderly, accused of involvement in witchcraft.
The Criminal Offences (Amendment) Bill 2002 was passed on Thursday and now awaits presidential assent to become law.
It was sponsored by a member of the opposition National Democratic Congress party.
Over 500 of people are being held in safe houses, so-called witch camps, that are spread across the country where they fled for safety after being accused of involvement in witchcraft, according to local media.
Some of the camps are thought to have been created over 100 years ago.
“It means that all witch camps stand proscribed. The law also requires that within a period the minister for social protection will take steps to reintegrate people who are being held in various camps,” Francis Xavier Sosu, the MP for Madina, told journalists.
He added: “It's going to bring about a serious mind shift, correct a lot of ills in our society and I'm confident that we are building a better society for ourselves.”
Rights campaigners said they were hoping for the president to assent to the bill soon.