Parti Islam SeMalaysia (PAS) has retained control of Kelantan and improved on its two-thirds majority in the state assembly, as it successfully fended off Barisan Nasional (BN), which has been keen to regain the state it lost 28 years ago.
It also unexpectedly won next-door Terengganu state in a night of huge losses for BN.
PAS leaders say they have won 34 seats to BN's 11 in the 45-seat legislative assembly, after a closely fought battle in this predominantly Malay state that had both sides claiming victory in the past few days.
The opposition Pakatan Harapan (PH), despite putting up several star candidates, failed to win any seats.
Official results are expected to be announced later today.
PAS also won nine Parliament seats, while BN bagged five.
PAS supporters gathered at its headquarters in Kota Baru shouted "Allahu akbar!" (God is great) after each victory was shown on a giant television screen.
Before yesterday, PAS had 31 of the 45 state seats, and seven out of 14 parliamentary seats.
PAS secretary-general and Kelantan lawmaker Takiyuddin Hassan said: "We are thankful for PAS' performance in Kelantan. It is the toughest fight for me... as it involved a three-cornered fight."
Kelantan's 1.8 million population is 95 per cent Malay, and the majority of voters have always supported PAS, although many seats were won by slim majorities in the last general election in 2013.
The eldest son of the late PAS spiritual leader Nik Aziz Nik Mat, who contested for PH, Mr Nik Omar, lost in his effort to take over his father's Chempaka state seat.