The visit of Saudi Arabia’s monarch King Salman to Malaysia this week was notable for many reasons. But it was clear from the discussions that took place between the two sides that terrorism was at the forefront. Indeed, the joint statement itself quite bluntly stated that terrorism “was the most important issue that was discussed.”

That should come as no surprise to close watchers of the relationship. It is certainly true that Malaysia’s engagement with Saudi Arabia is much more complicated than often portrayed. The logic of cooperation is rooted not just in converging interests like terrorism, but also the need for Malaysia’s government to boost its legitimacy by engaging with a leader of the Islamic world and the reality that Riyadh has played role in spreading more radical variants of Islam. It has also been marred by the Saudi link in Malaysia’s deepening 1MDB scandal implicating Prime Minister Najib Razak, for better or for worse