WHEN news broke of the assassination of Hamas leader Ismail Haniyeh in Teheran, the world groaned heavily.
The immense implications were not lost on leaders and observers, especially Prime Minister Datuk Seri Anwar Ibrahim, who quickly announced his condemnation.
It got the attention of international news outlets and placed Malaysia at the forefront of opposition to this act of aggression.
More outward displays of condemnation were made with ministers and government bodies issuing statements, special prayers being held and Malaysia sending a special representative to the funeral.
While Western leaders were largely silent, those in Qatar, Türkiye, China, Russia and Egypt condemned the murder of Haniyeh.
In joining this chorus, Anwar has made an important adjustment to Malaysia's foreign policy.
But how far is he willing to take this? And what are the implications if things continue to escalate in the Middle East?
A few months ago, the world waited with bated breath as hundreds of missiles were launched from Iran to Israel.
However, an escalation was avoided and the two countries returned to their tense stalemate. In the meantime, Israel continued its invasion of Gaza and targeted attacks on Iran's allies in the region.
Gradually, the Gaza war has been escalating. As Israel loses the war on the moral front, with worldwide demonstrations and outcries against the genocide, Prime Minister Benjamin Netanyahu is seeking new and desperate justifications to prolong the madness.
The killing of Haniyeh may be part of Netanyahu's grand scheme to provoke Iran to join the war on a larger scale.
Following the death of president Ebrahim Raisi in a helicopter crash in May, Iran elected a new president.
Coming out of relative obscurity, Masoud Pezeshkian defeated Saeed Jalili, the hardline candidate and former nuclear deal negotiator.
Pezeshkian's inauguration comes at a time of deep uncertainty and instability. All eyes are on him as the world awaits a possible reaction from Iran to Hani-yeh's murder.
So far, Iran has steered away from any overt response. Contrary to Western stereotypes, Iran is a rational actor and may opt to respond to Israel through its allies in the region, which might result in an escalation of the tensions in southern Lebanon.
And it's no surprise that Malaysia's support means a lot to Iran and Hamas.
For years, Malaysia has maintained a foreign policy that promotes good relations with West and East.
Our citizens can easily travel to most countries of the Middle East, as to any European country, visa-free and with a positive global reputation.
Given Malaysia's status as a small power, it has played its foreign policy in the middle.
Immediately after independence in 1957, Malaya opted to follow a Western-aligned path, fighting the communist threat domestically and retaining close relations with Britain.
However, for the most part of the Cold War, Malaysia was a part of the non-alignment movement. It claimed solidarity with the Global South, staying away from the United States-Soviet Union rivalry and other Cold War conflicts.
Malaysia forged a middle- ground policy, keeping good ties with the West and establishing relations with the communist world, most famously with China under the premiership of Tun Abdul Razak Hussein 50 years ago in 1974.
And now, Malaysia finds itself at another crossroads. The world remains divided. The Soviet Union may have collapsed, but for the West, the spectre of Russia and its allies remains. To this list, we add Iran.
For years, Malaysia has managed a delicate balance of good relations with Washington and Teheran.
It has adhered to the US-imposed sanctions and as a result, has placed strict banking restrictions on Iranians in Malaysia. But Malaysia has also been accused of operating in the grey area of these sanctions.
In May, the US Treasury sent a special envoy to confront Malaysia about its alleged role in the transfer of funds between Iran and Hamas and as a transshipment hub for Iranian oil.
The balance Malaysia seeks to achieve — a friend of both the US and Iran — appears to always be under scrutiny.
But Anwar is boldly forging ahead. He is open about close ties with the political arm of Hamas, largely ignoring the "terrorist" label applied by most of the Western world.
Gaza is a key rallying point for the Malay-Muslim population in the country. Strong alignment with Hamas therefore reaps important political benefits for Anwar and his cabinet.
Malaysia is faced with two main scenarios.
One, if Iran retaliates with a serious attack on Israel directly. This may draw in other countries as Israel would be able to justify a war with Iran, a country that is at odds not just with the West but also with other Islamic countries.
However, this is unlikely, given Iran's track record of avoiding direct confrontation.
A second and more likely scenario will see tensions developing and Iran continuing (maybe even increasing) its support for allies in the region.
In this scenario, Malaysia will find its balancing act hard to maintain but neutrality may be where it finds itself — unable to fully engage militarily but perhaps, well placed to play a bigger diplomatic role.
Malaysia can make good use of its close ties with Iran, Qatar and the political arm of Hamas and its openness to engage with the West. We have an opportunity to play a larger political role as we straddle both East and West.
Domestic benefits aside, this alignment with Hamas has so far not invited serious backlash from either the US or Europe. This works to Anwar's advantage should he wish to benefit from this new foreign policy positioning internationally.
The writer is a lecturer in Cold War History at Queen Mary University of London. She holds a DPhil in Oriental Studies from the University of Oxford