Representatives of Toronto's Islamic community attend a news conference in Toronto as the Royal Canadian Mounted Police announce the arrest of two men accused of plotting a terror attack on rail target, in Toronto, Monday April 22, 2013. A Royal Canadian Mounted Police officer pats a colleague on the back before a press conference in Toronto as the RCMP announce the arrest of two men accused of plotting a terror attack on rail target on Monday April 22, 2013. Officers from various law enforcement agencies including the Royal Canadian Mounted Police, Peel Regional Police, and Surete du Quebec gather at a news conference in Toronto on Monday, April 22, 2013, as the Royal Canadian Mounted Police announce the arrest of two men accused of plotting a terror attack on a rail target. Minister of Public Safety Vic Toews speaks to reporters regarding arrests that thwarted an alleged terrorist plot in Ottawa on Monday, April 22, 2013. AP Photo/The Canadian Press, Justin Tang TORONTO (AP) - Two men were arrested and charged with plotting a terrorist attack against a Canadian passenger train with support from al-Qaida elements in Iran, police said Monday. The case bolstered allegations by some governments and experts of a relationship of convenience between Shiite-led Iran and the predominantly Sunni Arab terrorist network. Chiheb Esseghaier, 30, and Raed Jaser, 35, had "direction and guidance" from al-Qaida members in Iran, though there was no reason to think the planned attacks were state-sponsored, RCMP Assistant Commissioner James Malizia said. Officials in Washington and Toronto said it had no connections to last week's bombings at the marathon in Boston. The arrests in Montreal and Toronto raised questions about Iran's murky relationship with the terrorist network. Bruce Riedel, a CIA veteran who is now a Brookings Institution senior fellow, said al-Qaida has had a clandestine presence in Iran since at least 2001 and that neither the terror group nor Tehran speak openly about it. "The Iranian regime kept some of these elements under house arrest," he said in an email to The Associated Press. Some probably operate covertly. AQ members often transit Iran traveling between hideouts in Pakistan and Iraq. U.S. intelligence officials have long tracked limited al-Qaida activity inside Iran. Remnants of al-Qaida's so-called management council are still there, though they are usually kept under virtual house arrest by an Iranian regime suspicious of the Sunni-/Salafi-based militant movement. There are also a small number of financiers and facilitators who help move money, and sometimes weapons and people throughout the region from their base in Iran. Last fall, the Obama administration offered up to $12 million in rewards for information leading to the capture of two al-Qaida leaders based in Iran. The U.S. State Department described them as key facilitators in sending extremists to Iraq and Afghanistan. The U.S. Treasury Department also announced financial penalties against one of the men. 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 AP late Monday. We reject strongly and categorically any connection to this story. The investigation surrounding the planned attack was part of a cross-border operation involving Canadian law enforcement agencies, the FBI and the U.S. Department of Homeland Security. The attack "was definitely in the planning stage but not imminent," RCMP chief superintendent Jennifer Strachan said Monday. Strachan said they were targeting a route, but did not say whether it was a cross border route. Best said the duo had been under investigation since last fall. Their bail hearing was scheduled in Toronto on Tuesday. Via Rail said that "at no time" were passengers or members of the public in imminent danger. Via trains_Canada's equivalent of Amtrak_carry nearly four million passengers annually. In Washington, Amtrak president Joe Boardman said the Amtrak Police Department would continue to work with Canadian authorities to assist in the investigation. Via Rail and Amtrak jointly operate trains between Canada and the U.S. Rep. Peter King, R-N.Y., said in a statement praising Canadian authorities for the arrests, that the attack was intended "to cause significant loss of human life including New Yorkers." Police said the men are not Canadian citizens, said they had been in Canada a "significant amount of time," and declined to say where they were from or why they were in the country. Muhammad Robert Heft, who runs an outreach organization for Islamic converts, and Hussein Hamdani, a lawyer and longtime advocate in the Muslim community, said one of the suspects is Tunisian and the other is from the United Arab Emirates. Both were part of a group of Muslim community leaders who were briefed by the RCMP ahead of Monday's announcement. Authorities were tipped off by members of the community of one of the suspects, Best said, without expanding. A spokeswoman for the University of Sherbrooke near Montreal said Esseghaier studied there in 2008-2009. More recently, he has been doing doctoral research at the Institut national de la recherche scientifique, a spokeswoman at the training university confirmed. Julie Martineau, a spokeswoman at the research institute, said Esseghaier began working at the center just outside Montreal in 2010 and was pursuing a PhD in nanotechnology. "We are, of course, very surprised," she said. A LinkedIn page showing a man with Esseghaier's name and academic background helped author a number of biology research papers, including on HIV and cancer detection. The page carries a photo of a black flag inscribed with the Islamic declaration of faith, and says he was born in Tunisia. The arrests just a few months after two Canadians were discovered among militants killed in a terrorist siege at a gas plant in Algeria. The siege killed at least 38 hostages and 29 militants, including Ali Medlej and Xristos Katsiroubas, two high school friends from London, Ontario. In 2006 Canadian police foiled the so-called Toronto 18 home grown plot to set off bombs outside Toronto's Stock Exchange, a building housing Canada's spy agency and a military base. The goal was to scare Canada into removing its troops from Afghanistan. The arrests made international headlines and heightened fears in a country where many people thought they were relatively immune from terrorist strikes. Associated Press writers Rob Gillies in Toronto, Benjamin Shingler in Montreal, Peter James Spielmann and Maria Sanminiatelli in New York, and Pete Yost and Kimberly Dozier in Washington contributed to this story.