Story highlights The FBI worked closely with Canadian authorities, the White House says

A U.S. official says a train along the New York-to-Toronto line was being targeted

One suspect, Raed Jaser, is in "disbelief" after his arrest, his lawyer says

Police say the suspects got help from al Qaeda in Iran; Iran denies al Qaeda operates in its borders

Passengers might have been catching a catnap, reading a book or daydreaming as they gazed out the window into southern Canada. They may have recently hopped on the train or boarded many hours ago as far back as New York.

Whatever their origin, wherever they were sitting, wherever they were going -- perhaps to the last stop of Toronto -- these travelers wouldn't have expected the terror that Canadian and U.S. authorities detailed this week, a plot they alleged was backed by al Qaeda elements half a world away.

According to a U.S. intelligence official and another government official, the plan was to plant explosives on a trestle -- a type of bridge over which trains often pass -- and detonate them after a northbound train crossed from the United States into Canada. Specifically, another U.S. official said, the New York-to-Toronto line that runs through Buffalo was targeted.

Once the explosives went off, two of the officials said, the train would have careered off its tracks, causing untold death and destruction.

The attack never happened. Instead, the two men who Canadian authorities say planned the alleged terror plot are behind bars.

JUST WATCHED Police: Suspects had al Qaeda support Replay More Videos ... MUST WATCH Police: Suspects had al Qaeda support 01:22

JUST WATCHED Police: 'No imminent threat' to public Replay More Videos ... MUST WATCH Police: 'No imminent threat' to public 01:49

JUST WATCHED Close-up look at disrupted terror plot Replay More Videos ... MUST WATCH Close-up look at disrupted terror plot 01:56

On Tuesday, a day after the Royal Canadian Mounted Police announced the arrests, 35-year-old Raed Jaser appeared in Old City Hall Court in Toronto, the city he calls home. Asked whether he understood the legal proceeding, Jaser said, "It's very clear."

But his lawyer, John Norris, afterward said that his client -- whom he described as a permanent resident in Canada, where he has lived the past 20 years -- is "in a state of shock and disbelief."

"He is anxious to see the evidence that the crown says that it has against him," Norris said outside the courtroom.

After waiving the reading of his charges, Jaser returned to the Canadian federal facility where he's being held. Bail was not considered Tuesday in his case.

His alleged co-conspirator -- 30-year-old Chiheb Esseghaier, who was taken to Montreal for a jurisdiction hearing so that a justice can decide whether he'll be transferred to the province of Ontario -- is expected to be in a Toronto courtroom Wednesday for a similar proceeding, said Norris.

According to court documents, both Jaser and Esseghaier face charges of conspiring "to murder persons unknown ... for the benefit of, at the direction of, or in association with a terrorist group."

Suspects not citizens but have roots in Canada

So who are these two suspects, and what were they doing?

Authorities have not released much detail about the men, including their nationalities or how long they'd been in Canada, beyond that they weren't Canadian citizens.

University of Quebec spokeswoman Julie Martineau said that, since 2010, Esseghaier has been a doctoral student at the National Institute of Scientific Research at that school.

He was conducting research on nanosensors, which are used primarily for medical treatments or to build other nanoproducts, such as computer chips, she said.

"He seemed like a normal student," said Martineau.

Authorities allege that Esseghaier and Jaser watched "trains and railways in the greater Toronto area" and intended to derail a passenger train, said Royal Canadian Mounted Police Chief Superintendent Jennifer Strachan.

"We are alleging these two individuals took steps and conducted activities to conduct a terrorist attack," she said.

Muhammad Robert Heft, a Muslim community leader in Toronto, told CNN that a tip from a local imam led to the investigation. Heft, president of the Muslim social services organization Paradise Forever , cited the Canadian police, which he said revealed the information during a briefing on Monday with local Muslim leaders.

"We are supportive and thankful that the RCMP did the investigation and was able to apprehend the individuals before anything happened," Heft said. "We are pleased that they took us in and explained what was going on."

The Canadian Broadcasting Corp., quoting "highly placed sources," reported that Esseghaier and Jaser had been under surveillance for more than a year. White House spokesman Jay Carney said Tuesday that the FBI worked with its law enforcement counterparts in Canada, its close ally, during the investigation.

The terror plot -- which a RCMP official said on condition of anonymity wasn't linked to last week's deadly Boston Marathon bombings -- was in its planning stages and not imminent, Canadian authorities said.

Still, the outlines are reminiscent of those found in a document seized during the raid in Pakistan that killed Osama bin Laden. This document indicated that al Qaeda members discussed as early as 2010 a plan to derail trains in the United States by placing obstructions on tracks over bridges and in valleys, though no specific rail system was identified, a law enforcement official told CNN in late 2011.

Police allege ties to al Qaeda in Iran

Authorities have said that they believe the suspects had help.

Royal Canadian Mounted Police Assistant Commissioner James Malizia said the men got "support from al Qaeda elements in Iran" to carry out an attack and conspire to murder people in greater Toronto. There's no evidence that Iran's government was behind the plot, he added.

"When I speak about 'supported,' I mean direction and guidance," Malizia said.

Iran denies that al Qaeda has any presence within its borders.

"Al Qaeda has no possibility to do any activity inside Iran or conduct any operation abroad from Iran's territory, and we reject strongly and categorically any connection to this story," Iran's mission to the United Nations said in a statement

Al Qaeda and Iran have not been viewed as allies, with al Qaeda's membership mostly Sunni-dominated rather than Shiite, the Muslim sect of the vast majority of Iranians.

"We have very little intelligence on al Qaeda in Iran," said U.S. Rep. Peter King, chairman of the House counterterrorism and intelligence subcommittee.

What is known is that bin Laden's son-in-law Sulaiman Abu Ghaith fled Afghanistan and ended up in Iran after the fall of the Taliban in 2001.

According to U.S. documents and officials, Abu Ghaith landed in Iran along with other members of bin Laden's inner circle, including the group's military commander, Saif al-Adel, and Saad bin Laden, a son of the al Qaeda leader who has played a leadership role in the group .

Saad bin Laden also helped one of his father's wives and several of his father's children move from Pakistan to Iran, officials said.

Abu Ghaith, a Kuwaiti, was captured in Jordan this year and is now in the United States, where he'll be charged in federal court with conspiring to kill Americans as part of al Qaeda.