"Had this plot been carried out, it would have resulted in innocent people being killed or seriously injured," said RCMP Assistant Commissioner James Malizia. "I want to re-assure our citizens that, while the RCMP believed the accused had the capacity to and intent to carry out these criminal acts, there was no imminent threat to the general public, rail employees, train passengers or infrastructure."

Authorities said the suspects had help from Al Qaeda elements in Iran.

The route of the targeted train reportedly runs between Toronto and New York City. In the U.S., that train is operated by Amtrak and stops in Buffalo and Niagara Falls, before crossing the border at the Whirlpool Bridge.

"Every time that there's been a some kind of terrorist incident, we we've put additional security on here at Niagara Falls because we know this is a famous place," Niagara Falls Mayor Paul Dyster said. "And just like terrorists might seek attention by blowing off bombs at the finish line of the Boston Marathon, so too Niagara Falls because it's a famous place."

The RCMP says the threat was caught early thanks to those collaborative efforts on both sides of the border.

Law enforcement officials say this incident has no connection to the Boston Marathon bombings.

Iran on Tuesday denied any links with an alleged terrorist plot that Canadian authorities claim was directed by al-Qaida operatives in Iran and sought to derail a passenger train.

Canadian authorities allege the suspects Chiheb Esseghaier, 30, and Raed Jaser, 35, had "direction and guidance" from al-Qaida members in Iran, though there were no claims the planned attacks were state-sponsored by Tehran. Esseghaier is believed to be Tunisian and Jaser from the United Arab Emirates.

Some al-Qaida members had been allowed to stay in Iran after fleeing Afghanistan, but were under tight Iranian controls. Relations have been rocky between mainly Shiite Iran and the Sunni-led al-Qaida on many fronts for years.

Iran was a strong opponent of the Taliban, which sheltered Osama bin Laden and others before the U.S.-led invasion after the Sept. 11, 2001, attacks. Many al-Qaida leaders also view Shiite Muslims with suspicion and hostility.

Iran's Foreign Ministry spokesman Ramin Mehmanparast told reporters that there is "no firm evidence" of any Iranian involvement and groups such as al-Qaida have "no compatibility with Iran in both political and ideological fields."

"We oppose any terrorist and violent action that would jeopardize lives of innocent people," said Mehmanparast.

He called the Canadian claims part of hostile policies against Tehran, and accused Canada of indirectly aiding al-Qaida by joining Western support for Syrian rebels. Some Islamic militant factions, claiming allegiance to al-Qaida, have joined forces seeking to topple the regime of Bashar Assad, one of Iran's main allies in the region.

"The same (al-Qaida) current is killing people in Syria while enjoying Canada's support," said Mehmanparast.

In a separate comment, Iranian Foreign Minister Ali Akbar Salehi called the claim by Canadian authorities "the most ridiculous fake words."

"I hope Canadian officials resort to more wisdom," he said.

The two countries have no diplomatic relations after Canada unilaterally closed its embassy in Tehran in 2012 and expelled Iranian diplomats from Ottawa.

On Monday, Alireza Miryousefi, spokesman for the Iranian mission to the United Nations, said the terrorist network was not operating in Iran.

"Iran's position against this group is very clear and well known. (Al-Qaida) has no possibility to do any activity inside Iran or conduct any operation abroad from Iran's territory," Miryousefi said in a statement emailed to The Associated Press. "We reject strongly and categorically any connection to this story."