Public caning is already allowed in Indonesia
The new law was approved in the state assembly of Kelantan, which is governed by a conservative Islamist party, PAS, and where nightclubs and cinemas are banned.
The northeastern state has been pushing for the adoption of a strict Islamic penal code, called 'hudud', that would provide for punishments such as stoning for adultery and amputations for theft.
It is unclear what crimes will be punishable by public caning but it is thought to include adultery.
Caning can now be carried out inside or outside of prison, depending on the court's decision
Kelantan deputy chief minister Mohd Amar Nik Abdullah
According to Bernama state news agency Kelantan deputy chief minister Mohd Amar Nik Abdullah the amendment allowing public caning was passed as part of an effort to streamline sentencing under Islamic criminal law.
He said: "Caning can now be carried out inside or outside of prison, depending on the court's decision.
"This is in line with the religion, which requires that sentencing must be done in public."
Islamic law is implemented in all Malaysian states but is restricted to family issues such as divorce and inheritance, as well as sharia crimes involving Muslims, such as consuming alcohol and adultery. Criminal cases are handled by federal law.
Critics say the amendment could be unconstitutional and infringe on the rights of religious minorities.
Ethnic Malay Muslims make up more than 60 per cent of Malaysia's 32 million people and attempts to implement stricter forms of sharia law in recent years have raised concerns among members of the ethnic Chinese, Indian and other minorities.
The new law was approved in the state assembly of Kelantan
It is unclear what crimes will be punishable by public caning Ti Lian Ker, a member of the Malaysian Chinese Association, part of the ruling coalition, said public canings were unconstitutional under federal criminal law.
He said: "This is a rewriting of our legal system and spells a bleak future for the nation.”
Last year, the PAS introduced a bill that would expand the powers of sharia courts and incorporate parts of hudud (Islamic punishment) into the existing legal system.
The bill is expected to be debated in parliament when it reconvenes later this month.