TEHRAN, Iran - 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.

RCMP 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."