Jamaica is preparing to abolish a slavery-era law allowing flogging and whipping as means of punishing prisoners, the country's justice ministry has said.

The punishment had not been ordered by a court since 2004, the ministry said, but the statutes remain in the island's penal code. It was administered with strokes from a tamarind tree switch or a cat o'nine tails, a whip made of nine knotted cords.

The justice minister, Mark Golding, said the punishment was an anachronism that violated Jamaica's international obligations and prevented the government from ratifying the UN convention against torture.

"The time has come to regularise this situation by getting these colonial-era laws off our books once and for all," he added. The cabinet has approved repealing the flogging law and amendments to other laws.

The announcement was welcomed by human rights groups. "We don't really see that [the flogging law] has any part in the approach of dealing with crime in a modern democracy," said Susan Goffe, of Jamaicans for Justice.

However, some Jamaicans felt the authorities should not drop the old statutes but instead enforce them. "The worst criminals need strong punishing or else they'll do crimes over and over," said Chris Drummond, a Kingston resident. "Getting locked up is not always enough."

The last person to suffer the punishment in Jamaica was Errol Pryce, who in 1994 was sentenced to four years in prison and six lashes for stabbing his mother-in-law. Pryce was flogged the day before being released from prison in 1997 and later complained to the UN human rights committee, which ruled in 2004 that the form of corporal punishment was cruel, inhuman and degrading and violated his rights. Jamaican courts then stopped ordering whipping or flogging.