Mahathir Muhammad was quoted by The Star newspaper on Tuesday as saying he did not consider Terengganu's Islamic criminal legislation as true Sharia laws.
His comments came after the state, controlled by the Islamic Party (PAS), announced a Sharia act to criminalise illicit sex, drinking alcohol and the renunciation of Islam.
Sharia punishments include stoning to death for adultery, amputation of limbs for theft, death for robbery, and 40 to 80 lashes of the whip for drinking alcohol.
For those renouncing Islam, offenders have three days to repent, failing which the punishment is death and confiscation of property.
"It is PAS's law," said the veteran premier, who retires on Friday after 22 years in office.
"They can implement it but if they do something which is inconsistent with the country's laws, we will take legal action."
Legal experts say PAS has no right to impose criminal laws, which come under the federal government's jurisdiction, but the party insists these are religious matters which come under the state's purview.
PAS has consistently criticised Mahathir's government for following a western, secular model at the expense of a traditional Islamic system which is popular with Malaysia's Muslims.
The PAS party advocates the
Islamisation of Malaysian society
In a recent interview, Terengganu's Chief Minister Abd al-Hadi Awang defended the Sharia code.
Muslims make up 60% of Malaysia's 23 million people, but Sharia law has been opposed by members of the large ethnic Chinese and Indian minorities.
"Although our penalties are harsh and terrifying, we must realise that these offences and sins... are truly evil and despicable," he said.
At present Sharia law covers civil matters such as divorce for Malaysian Muslims, but is not part of the criminal code under Mahathir's government.
PAS, which also rules neighbouring Kelantan state and holds 27 of Malaysia's 193 federal parliament seats, is the only significant threat to Mahathir's United Malays National Organisation.
Source: Aljazeera + Agencies