The Canadian government is right to criticize Saudi Arabia's controversial decision to put to death a Shi'a cleric, Sheikh Nimr al-Nimr, who was executed along with 46 other people behind closed doors. Though al-Nimr is not Iranian, he was from the Shi'a sect of Islam that most Iranians adhere to, whereas the Saudi kingdom is predominantly Sunni, which is why this action prompted outrage from the Iranian government and the people of Iran, leading to widespread protests throughout the country. These protests culminated on January 2, when protesters ransacked and set fire to the Saudi embassy in Tehran, which evoked memories of similar actions in 1979 against the US embassy and against the British embassy in 2011.

The Saudi government retaliated to this action on Sunday, January 3, by severing diplomatic relations with Iran, which was soon followed by three Sunni Arab states - Bahrain, Sudan and the United Arab Emirates - on Monday.

The history of Saudi-Iranian relations has been tumultuous at best. Following Iran's revolution in 1978-79, relations between the new revolutionary regime in Tehran and Riyahd crumbled after the Saudi government offered support to the Sunni-dominated regime of Saddam Hussein in Iraq after its failed invasion of Iran in 1980. Tensions escalated further in 1996, when the U.S. government held Iran responsible for the bombing of the Khobar Towers complex in Dahran, Saudi Arabia, which killed 19 American servicemen.

However, Iran's election in 1997 of Mohammad Khatami, a moderate reformer determined to bring his country out of isolation, brought about a thaw in relations, culminating in Khatami's visit to the kingdom in 1998. Unfortunately, relations returned to hostility during the presidency of Mahmoud Ahmadinejad, who rapidly escalated Iran's nuclear program, which Saudi Arabia viewed as a direct threat. In 2008, the Saudi monarchy even went so far as to ask the United States to "cut of the head of the snake" by launching risky military strikes on Iran's nuclear infrastructure. The United States refused.

The current hostilities between Iran and Saudi Arabia can be traced to the Arab Spring and the outbreak of regionwide sectarian civil war, which has seen the region split into Saudi-back Sunni militias and Iranian-back Shi'a forces. The origin of this divide goes back centuries, but the current hostilities are actually a byproduct of the US-led invasion of Iraq, which overthrew a Sunni government and handed the country over to its Shi'a majority. While Saddam Hussein was no friend of the Saudis, he was at least a Sunni, whereas the subsequent governments of Iraq have all been Shi'a and have moved the country closer to Iran.

When the Arab Spring broke out in 2011, the Saudis were put on the defensive as neighbouring allies, like Hosni Mubarak in Egypt and Ali Abdullah Saleh of Yemen, were toppled by popular protests. When similar protests erupted in Bahrain, a small Shi'a populated sheikhdom in the Gulf that was run by a Sunni monarchy, the Saudi government accused Iran of fermenting dissent and intervened militarily in March 2011 to help crush the protesters.

In Syria, the opposite occurred. Since the 1980s, the Iranian government had been closely aligned with the Baathist regime of Hafez al-Assad and then his son, Bashar (the current president), who hail from the minority Alawite sect of Islam, which is closer to Shi'ism than Sunnism.

With the outbreak of the Syrian Civil War in 2011, the Saudis and their Sunni Gulf allies began providing financial aid and weapons to Sunni opposition groups, hoping to unseat Iran's main regional ally. The Iranians responded by increasing their support for the Assad regime, including the provision of military and economic aid and sending troops from the elite Quds Force, which staved off defeat, while the civil war deteriorated even further.

In recent months, however, the United States has played a key role in bringing both Iran and Saudi Arabia to the table at peace talks designed to bring about an end to the Syrian Civil War. While the initial round of talks were quite successful, Saudi Arabia's execution of al-Nimr appears to be designed to provoke Iran in a way that will force it to walk away from these talks, thereby giving the Saudi's an advantage in what has truly become a regionwide sectarian civil war.

So what are the consequences of Saudi Arabia's action? According to a strongly worded editorial in the New York Times, the execution of al-Nimr and the Iranian attack on the Saudi embassy will "set back international efforts to resolve the wars in Syria and Yemen and to combat the Islamic State and other Islamist terrorist organizations." Moreover, their actions have undermined the first real chance to bring about a semblance of stability in a region that has been in the grip of sectarian conflict since the turn of the millennium. For these reasons, Justin Trudeau and his government are right to have condemned Saudi Arabia's needlessly provocative actions.