I've got relatives in Malaysia and have been there a couple of times, and from that I knew that Malays are, from birth, automatically considered muslims, and that they aren't allowed to become non-muslims, but I didn't know that they aren't legally allowed to marry non-muslims, as this article on an upcoming court case in Malaysia says:
Ethnic Malays, who make up just over half of Malaysia's 26 million people, are deemed Muslims from birth.
Constitutionally, freedom of religion is guaranteed. But in reality, conversion out of Islam falls within the ambit of sharia or Islamic courts. And sharia law prescribes fines or jail for those who renounce Islam, effectively ruling out the option.
Muslims who leave Islam end up in legal limbo, unable to register their new religious affiliations or legally marry non-Muslims. Many keep quiet about their choice or emigrate.
Lina Joy, now in her early 40s, was born Azlina Jailani and brought up as a Muslim but at the age of 26 decided to become a Christian. [...]
Until the entry [on her identity card] is deleted, she cannot legally marry outside the Muslim faith. The legal wrangling began when she took the department to court over the anomaly.