Iran’s parliament and the shrine of its revolutionary father were the targets Wednesday of what appears to be the Islamic State militant group’s first major attack on Iranian soil. In an operation that seemed to require a level of coordination not often typical of ISIS attacks in the West, gunmen and suicide bombers penetrated deep inside Iranian territory and attacked two symbols of Iranian political identity, killing at least 13 people and wounding dozens.

The twin assault, the worst terrorist attack Tehran has seen in more than a decade, also came at a time of heightened regional tension, with Saudi Foreign Minister Adel al-Jubeir calling for Iran to be punished for what it deemed interference in regional affairs and various politicians weighing in on an escalating Qatar crisis. The shocking strike, coupled with the chaos, could mean an exacerbation of several bad situations if tensions aren’t quelled.

While the overwhelming majority of the international community condemned the deadly incident, U.S. President Donald Trump not only failed to issue a direct condemnation, but also suggested, in a statement released hours later, that Iran deserved it.

The world cannot afford for Trump to continuously play with the word ‘terrorism’ and shift America’s policies based on his personal whims and interests.

“We grieve and pray for the innocent victims of the terrorist attacks in Iran, and for the Iranian people, who are going through such challenging times,” the two sentence press release began. It concluded: “We underscore that states that sponsor terrorism risk falling victim to the evil that they promote.”

Trump’s insensitive remarks evoke both dangerous ignorance and glaring hypocrisy on his part. During his presidential campaign, Trump directed his ire towards Saudi Arabia. He declared that he was “not a big fan” of the Saudis. And as a citizen, he proclaimed they were the “world’s biggest funder of terrorism.” After the election, however, he sharply changed his tune, praising the U.S.-Saudi “strategic partnership” and making Iran the focus of his anti-terrorism rhetoric.

This move was underscored at a recent summit in Riyadh, where Trump shifted U.S. regional policy towards total alignment with Saudi Arabia, decisively breaking away from the previous U.S. administration’s policy of diplomatic engagement with Iran and attempts to ameliorate Saudi-Iranian tensions. Trump’s change of heart on Saudi Arabia occurred amid a massive Saudi-linked lobbying campaign in Washington ― which in part reportedly relied on hiring former Trump advisers and spending around $270,000 at the Trump International Hotel ― as well as a $110 billion arms deal.

Interestingly, while the target of Trump’s furor in Riyadh was Iran, as the Qatar crisis developed, Trump once again brazenly contradicted what he had said just weeks earlier. Even though Trump made no mention of Qatar in his Riyadh speech and even met with the Qatari emir while in Saudi, he tweeted the following about terrorism after Saudi Arabia and its allies cut ties with Qatar this week:

So good to see the Saudi Arabia visit with the King and 50 countries already paying off. They said they would take a hard line on funding…

The world simply cannot afford for Trump to continuously play with the word “terrorism” and regularly shift America’s policies based on his personal whims and interests. The United States needs to take serious action in fighting terrorism. Further, Trump’s relentless quest to implement his Muslim ban, which includes Iran and other Muslim-majority countries, and his attacks on London Mayor Sadiq Khan following violent acts in the United Kingdom, only serve to alienate Muslims and in turn fuel the fear terrorists thrive on.

Whether in San Bernardino, London, Paris, Baghdad, Kabul or the heart of Iran, innocent people everywhere are in the same boat in the face of this barbarity.

The reality is that the Tehran attacks highlight the common threat faced by nations across the world from groups such as ISIS. Whether in San Bernardino, London, Paris, Baghdad, Kabul or the heart of Iran, innocent people everywhere are in the same boat in the face of this barbarity. Iran, seemingly unbeknownst to Trump, has since its 1979 revolution been a chief victim of both terrorism and state violence. In the decade after the revolution, it was wracked by former Iraqi dictator Saddam Hussein’s invasion of Iran and attacks by groups such as the notoriousMujahideen-e Khalq, or MEK, which has been responsible for the killing of thousands of Iranian civilians, as well as senior officials and public figures, and was once labeled a terror group by America.

This week, Tehran has become the unlikely victim of ISIS terror. But for the last few years, it has been leading from the ground the fight against ISIS in Syria and Iraq. The same cannot be said of Saudi Arabia.

After his recent re-election, Iranian President Hassan Rouhaninoted how Saudi Arabia provided Saddam Hussein with some $97 billion during the Iran-Iraq War. Saudi Prince Turki al-Faisal, a former head of Saudi intelligence, has admitted to meeting a few times with Sept. 11 attack mastermind Osama bin Laden in the 1980s and delivered the keynote address at an MEK gathering during which he praised the group and emphatically supported its objective of toppling the Iranian government. Prominent U.S. analysts have also commented on the Saudi government connection to Wahhabi terrorist groups such as ISIS, as have numerous U.S. officials and media figures. “Almost every terrorist attack in the West has had some connection to Saudi Arabia. Virtually none has been linked to Iran,” Fareed Zakaria, host of CNN’s “Fareed Zakaria GPS,”wrote in a recent Washington Post column.

Even though the attacks in Tehran came after a contentious Iranian presidential campaign, they will serve to unify the Iranian people and make them more resilient in the face of terror. In fact, Iran’s Revolutionary Guards have already stated they “will never allow the blood of innocents to be spilt without revenge” and asserted the U.S. and Saudi Arabia were “involved” in the attack.

But Iran and Saudi Arabia must be careful not to fall into the trap of all-out confrontation. Iran has long been ready for dialogue with Saudi Arabia, with both President Rouhani and Foreign Minister Javad Zarifmaking numerous overtures since 2013. It would be best if that route were taken before sectarian conflict rises to a new level, proxy wars in Yemen and Syria get worse and ISIS decides to strike again to make up for its blows in Syria and Iraq. But Iran needs support.

Terrorism knows no borders. Collective cooperation is necessary to eradicate it, and this must begin with the West viewing Iran as a partner in the fight, not an enemy. The West must seriously confront the material and ideological sources that enable terrorist groups like ISIS to emerge. This will require the Trump administration to refrain from encouraging Saudi Arabia’s zero-sum mentality towards Iran and giving Saudi leaders carte blanche to further stoke instability in the region. Instead, the president must have tough conversations with Saudi officials and other allies about Riyadh’s role in the facilitation of terrorism.

Trump must have tough conversations with Saudi officials and other allies about Riyadh’s role in the facilitation of terrorism.

Donald Trump now has the option to help de-escalate tensions between Saudi Arabia and Iran before they spiral out of control. But to accomplish this, he will need to balance America’s relations with regional powers, namely by establishing channels of dialogue with Iran, and incentivize them to move towards cooperation. And he’ll need to pressure Saudi Arabia to diplomatically engage Iran.