Kuala Lumpur: The Malaysian government has announced a ban on Israeli-owned and flagged ships, as well as vessels destined for Israel, from docking at its ports, CNN reported on Wednesday.

The decision, effective immediately, is in response to Israel's actions in the war with Hamas.

The announcement by Malaysian PM Anwar Ibrahim stated that the ban is a reaction to Israel's disregard for humanitarian principles and violations of international law, citing ongoing cruelty against the Palestinian people.

"This sanction is a response to Israel's actions that disregard the basic humanitarian principles and violate international law through the ongoing massacre and continuous cruelty against the Palestinian people," CNN quoted the statement .

As a country with a Muslim-majority population, Malaysia has a history of advocating for Palestinian rights and does not recognise Israel, similar to neighbouring countries like Indonesia, Brunei, Bangladesh, the Maldives, and Pakistan.

The recent bombardment of Gaza by Israel's military following Hamas' attacks in October has led to mass rallies in Malaysia, putting political pressure on PM Ibrahim.

The Malaysian PM known for his outspoken stance against Israel and its US backers, emphasised in a parliamentary speech in November that the government would maintain ties with Hamas and "would not punish" the group for its actions in Israel on October 7, which resulted in numerous casualties and hostages.

Malaysian passports explicitly state "Valid for all countries except Israel," and Israeli passport holders are prohibited from entering Malaysia without prior permission, according to CNN.

The government's announcement highlighted that Israeli-registered companies and ships had been allowed to dock in Malaysia since 2005. However, the current government has decided to override the past Cabinet's decision and prohibit ships using Israeli flags from docking in the country.

The statement specifically mentioned the Israel-based global shipping company ZIM, noting that its vessels had been docking in Malaysia since 2002.

"For the record, ZIM vessels have been docking in Malaysia since 2002," the statement said.

In addition to the ban on Israeli-owned and flagged ships, Malaysia has also implemented a "a ban on any ship that are heading to Israel from loading cargo at Malaysian ports," CNN reported.