The RCMP had been following one of the two suspects accused of trying to carry out an al-Qaeda supported plot to derail a Via passenger train for almost a year, CBC News has learned.

Sources told CBC’s Power & Politics host Evan Solomon that the RCMP had tracked Chiheb Esseghaier, 30, of Montreal, since May 2012. At that time, two undercover surveillance officers watched him on an Air Canada flight to Cancun where he was to attend a biomedical conference.

Esseghaier’s behaviour on the plane was "bizarre," and he had an altercation with a female flight attendant after he went to the washroom, sources say.

As well, sources told CBC News that the arrests of Esseghaier and Raed Jaser, 35, of Toronto, were made because the behaviour of one of the suspects had become increasingly unpredictable. However, it is not known which suspect.

Esseghaier and Jaser are facing a number of charges including conspiracy to commit murder for the benefit of a terrorist group, authorities announced on Monday. They made separate court appearances in different provinces today, with early indications that both will likely plead not guilty to the charges.

CBC News has also learned that a member of al-Qaeda living in Iran, on the border with Afghanistan, was guiding and motivating the alleged suspects.

Meanwhile, police and intelligence agencies have been monitoring a broader network of terrorism suspects beyond the two men accused of plotting to derail a Via Rail passenger train, CBC News has learned.

Canadian and U.S. law enforcement have been co-operating on surveillance of suspects on both sides of the border for some time.

Jaser made a court appearance Tuesday in Toronto, while prosecutors in Montreal requested that jurisdiction in Esseghaier’s case be moved to Toronto.

Prosecutors allege that the offences took place between April 2012 and February of this year.

Broader network under surveillance

CBC News has also learned this broader network has been under surveillance for many months — authorities also monitored their travel within North America — and Canadian authorities became more concerned after they received a tip about some men who were examining railway tracks in Ontario.

In Toronto on Tuesday, a judge granted a publication ban on the proceedings in a brief court appearance where Jaser was remanded in custody until his next appearance May 23.

"He's in a state of shock and disbelief," lawyer John Norris said of his client, 35-year-old Raed Jaser, speaking to crowds of reporters outside the Toronto courthouse.

"He's anxious to see the evidence that the Crown says it has against him."

Esseghaier declines lawyer for hearing

In another packed courtroom in Montreal, a bearded Esseghaier, who RCMP say has no fixed address, declined to be represented by a court-appointed lawyer at the hearing over jurisdiction.

The two men arrested are accused of plotting to attack a passenger train in the Toronto area. (iStock)

He made a brief statement in French in which he called the allegations against him unfair.

Neither man is a Canadian citizen, but each was in the country legally. RCMP did not say where either man was from or how they came to live in Canada, but The Canadian Press said Esseghaier is believed to be Tunisian.

Jennifer Strachan, chief superintendent of RCMP criminal operations in the province of Ontario, said Monday the two suspects watched trains and railways in the Greater Toronto Area.

"We are alleging that these two individuals took steps and conducted activities to initiate a terrorist attack," she told reporters.

There was a specific route targeted, not necessarily a specific train, Strachan said, although she declined to reveal the route. Police said the attack was not imminent.

According to a Reuters report, U.S. law enforcement and national security sources said the alleged plot targeted a rail line between Toronto and New York City. Via Rail and Amtrak jointly run routes between Canada and the U.S. Both companies say they're working with authorities.