The killing of Qassem Soleimani, the powerful Iranian military commander, by the U.S. has turned the spotlight on Iran's global links, especially with the Islamic world. The U.S. is watching closely who in the Muslim world, outside the Middle East, will stand with Iran or, worse from its perspective, support Iran in its quest for revenge.

Iran is trying its best to use the killing to rally support among the international Muslim community -- which includes Indonesia, with the world's largest Muslim population, and Malaysia, both deemed moderate by the West. How their governments and populations side will indicate how well the U.S.'s efforts to isolate Iran are working since Soleimani's death.

At the official level, Iran, Malaysia and Indonesia are tied together as part of the Organization of Islamic Cooperation, but there are tensions. Muslims in Southeast Asia are overwhelmingly of the Sunni sect, while Iran's are Shia. There are around 230 million Muslims in Indonesia, an eighth of the world's total, and less than 1 million are Shia, including foreigners living in Indonesia.

The Islamic authorities in Malaysia and Indonesia actively suppress Shia movements and do not recognize Shia teachings, and Malaysia even arrests Shia adherents.

Nevertheless, the number of Shia followers in these two countries has gone up over the past two decades, in part because of the large number of Iranians living there. Many Iranians find it easy to get a residence permit in both countries, often by registering as students or setting up a business. Because of U.S.-led sanctions against Iran, many Iranians go to both countries for holidays and to bypass the sanctions.

There are also thousands of Iranian professionals working in Indonesia and Malaysia. Many rich Iranians, in fact, have used Kuala Lumpur as a base, and they like it and Jakarta for their liberal social environment.

The Malaysian and Indonesian governments are normally wary of getting too close to Iran as they have always striven to maintain close relations with Saudi Arabia. The Saudis not only control the quota for the number of people allowed to perform the annual Hajj pilgrimage to Mecca, but are seen as a source of investments. On top of this, there are thousands of Malaysians and Indonesians studying at Saudi Islamic institutions and many mosques and Islamic NGOs in both countries that rely on Saudi money.

Muslim pilgrims wait inside a bus before leaving for the Hajj pilgrimage to Mecca in Jakarta in July 2019: the Saudis control the quota for the number of people allowed to perform the Hajj. © Anadolu Agency/Getty Images

In 2017, Indonesia rolled out the red carpet for the Saudi king in his first visit there and received $7 billion dollars in investment. There is also big money in remittances: about half a million Indonesians are working in Saudi Arabia, mostly as domestic maids, and they sent back $3.9 billion in 2018.

Malaysia's closeness with Saudi Arabia has changed since the fall of Prime Minister Najib Razak in 2018, who claimed Saudi royals had given him the millions which appeared in his personal bank account.

Najib's successor, Mahathir Mohamad, annoyed the Saudis last month when he organized a summit and invited the leaders of Indonesia, Pakistan, Turkey, Iran and Qatar to be keynote speakers. The Saudis saw it as a challenge to their preeminent role in OIC and put extraordinary pressure on Pakistan and Indonesia to withdraw.

At an official level, both Malaysia and Indonesia will take a neutral stand on the Soleimani killings. They will not support either the U.S. or Iran and will stick to diplomatic-speak on the importance of peace and de-escalation. The Saudis will also be working behind the scenes to ensure that both countries take a neutral stand.

However, among the ordinary population, I would argue there is strong support for Iran in its current confrontation with the U.S.

Many Malaysians and Indonesians have admired Iran's resilience in the face of U.S. sanctions and its quest to build a nuclear bomb. While they probably do not accept its Shia teachings, when it comes to fighting Americans, they will support Iran.

But this is a short-term prospect. In the long run, it is unlikely that Iran will profit politically from the Soleimani killing. The Muslim community in Southeast Asia is overwhelmingly Sunni, and the Sunni-Shia divide will be too difficult to overcome.

The best thing for President Donald Trump to do now is stop threatening Iran on Twitter. The more he does, the more support he is building from ordinary Muslims in Southeast Asia for Iran.

James Chin is Director of the Asia Institute, University of Tasmania.