On Monday, Canadian authorities claimed that the two men who allegedly tried to derail a Toronto passenger train had "direction and guidance" from al Qaeda operatives in Iran, according to The New York Times. If true, that would be very surprising. After all, Iran, a majority Shiite country, has historically had chilly relations with al Qaeda, which is usually hostile to non-Sunni Muslims.

Canadian police have so far declined to elaborate further on how the two suspects, Chiheb Esseghaier, 35, and Raed Jaser, 30, are tied to Iran.

Iranian foreign minister Ali Akbar Salehi swatted down the alleged link on Tuesday: "It is really ridiculous to link al Qaeda to Iran. I hope that the Canadian authorities think a bit more rationally and pay attention to the consciousness of the people and world public opinion."

Indeed, for much of recent history, Iran and al Qaeda have essentially been enemies. As Jonathan Kay points out in Canada's National Post, Iran almost went to war with the al Qaeda-friendly Taliban in 1998 after Taliban fighters killed nine Iranian diplomats in the Afghan city of Mazar-i-Sharif. What followed were threats by the Taliban to attack Iranian cities, and the massing of nearly 70,000 Iranian troops near the Afghanistan border.

In 2008, Seymour Hersh penned an article in The New Yorker reporting that the United States, in an effort to undermine the Iranian regime, was actually supporting Baluchi groups in Iran. Those Baluchi groups were described this way by former CIA officer Robert Baer: "Sunni fundamentalists who hate the regime in Tehran, but you can also describe them as al Qaeda."

Today in Syria, Iranian-backed Hezbollah militants are facing off with fighters from the al Qaeda-supported al-Nusra Front.

"It's not like Iranians are going to allow a Sunni terrorist group to plan an attack that might result in more hostilities against the Shiite nation of Iran," Rick "Ozzie" Nelson, a former U.S. counter-terrorism official, told the Los Angeles Times. "There's no love lost between them."

Still, the enemy of my enemy is my friend, as the saying goes. And remember, several senior al Qaeda members are believed to have fled to Iran after the U.S. invasion of Afghanistan. (They were put under house arrest by Iran's Revolutionary Guard, according to BBC.com.) Last year, Seth G. Jones, author of Hunting in the Shadows: The Pursuit of al Qa'ida since 9/11, wrote about Tehran's improving relations with al Qaeda in Foreign Affairs:

Just as with its other surrogate, Hezbollah, [Iran] could turn to al Qaeda to mount a retaliation to any U.S. or Israeli attack ...

It would be unwise to overestimate the leverage Tehran has over al Qaeda's leadership. The terrorist organization would almost certainly refuse Iranian direction. But given the group's current challenges, any support or tentative permission to plot on Iran's soil would be helpful. [Foreign Affairs]

As for the relationship between Canada and Iran, diplomacy deteriorated dramatically last year, after Canadian foreign affairs minister John Baird expelled all Iranian diplomats from Canada and closed its embassy in Tehran, according to the Toronto Star.