Police in Canada said Monday that two men they arrested were plotting to derail a passenger train, and were guided by al Qaeda elements in Iran, which surprised many experts who study terrorism in the Middle East.

The Royal Canadian Mounted Police said Monday it had arrested Chiheb Esseghaier, 30, of Montreal, and Raed Jaser, 35, of Toronto in the plot, which authorities said was not linked to last week's Boston Marathon bombings.

U.S. officials said the attack would have targeted a rail line between New York and Toronto, a route that travels along the Hudson Valley into New York wine country and enters Canada near Niagara Falls.

Canadian police said only that the plot involved a VIA train route in the Toronto area, Reuters reported. VIA is Canada's equivalent of Amtrak and operates passenger rail services on track owned primarily by Canadian National Railway Co.

“It frankly doesn’t compute for me,” Barbara Slavin, a senior fellow at the Atlantic Council, told the Los Angeles Times. "If there is any link, I would think it was extremely tangential."

Iran and al Qaeda have frequently had chilly relations, according to Slavin and other experts, and Iran tacitly supported the U.S.-led invasion of Afghanistan in 2001 that unseated al Qaeda’s Taliban patrons. Iran is ruled by the Shi’a clerical hierarchy, while al Qaeda is firmly Sunni. In Syria, self-proclaimed al Qaeda forces are fighting alongside the opposition while Iran is backing President Bashar al-Assad. Iran has also held al Qaeda members under house arrest, monitoring their activities. And documents confiscated from Osama bin Laden's hideout in Pakistan by the Americans and released last year suggested discord between the two.

The RCMP said there was no reason to believe that the plot was sponsored by any state, which would mean the Iranian government was not involved. They provided no further details on the alleged involvement of “al Qaeda elements in Iran.”

Even if Iran and al Qaeda share some of the same enemies, “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. counterterrorism official and a senior affiliate at the Center for Strategic and International Studies, told the LA Times. “There’s no love lost between them.”

If al Qaeda members detained in Iran were able to continue orchestrating attacks, that could mean they have more freedom there than previously believed, Nelson said. That might mean they were able to plot an attack without being detected by Iranian authorities. The question could be, "How much of this was them [the Iranians] just not paying attention?" Nelson said.

But not everyone dismisses the idea that Iran and Al Qaeda could team up. “Iran appears willing to expand its limited relationship with al Qaeda,” Rand Corp. senior political scientist Seth Jones wrote in Foreign Affairs magazine last year. Al Qaeda would probably reject any direction from Iran, he wrote, but “any support or tentative permission to plot on Iran’s soil would be helpful.”

The Treasury said in October that Iran has allowed al Qaeda to operate a pipeline moving money and fighters to support Al Qaeda activities in South Asia. While Sunni extremists often consider Shi’ites to be “heretics,” some Shi’ite extremists have tried to forge alliances, said Jeffrey Bale, a senior researcher at the Monterey Institute of International Studies. Al Qaeda members are believed to have gotten training from Iranian-backed Hezbollah in Lebanon in the past.

“It’s extremely complicated and murky,” Bale said. Iran itself is not a monolith, he added, and different parts of its military and clerical establishment might weigh working with Al Qaeda differently.

A U.S. government source told Reuters Iran is home to a little-known network of alleged al Qaeda fixers and "facilitators" based in the Iranian city of Zahedan, very close to Iran's borders with both Pakistan and Afghanistan.

The source said the operatives serve as go-betweens, travel agents and financial intermediaries for al Qaeda operatives and cells operating in Pakistan and moving through the area.

They do not operate under the protection of the Iranian government, which has a generally hostile attitude towards Sunni al Qaeda militants, and which periodically launches crackdowns on the al Qaeda elements, though at other times appears to turn a blind eye to them.

Rep. Peter King, R-N.Y., chairman of the House Homeland Security Subcommittee on Counterintelligence and Terrorism, told the Wall Street Journal the Iranian connection is striking.

"They've made alliances of convenience over the years" but they have also had competing goals, he said. "We know very little about al Qaeda's relationship with Iran."

The alleged plot is one of a handful of terrorism-related investigations involving Canadians or Canadian residents.

Police said earlier this year that Canadians took part in an attack by militants on a gas plant in Algeria in January, while Canadian and Somalia authorities are investigating whether a former University of Toronto student participated in a bomb attack on Mogadishu last week.

And in 2006, police arrested and charged nearly 20 Toronto-area men accused of planning to plant bombs at various Canadian targets. Eleven were eventually convicted.