One of the two men accused of plotting a terror attack on a Via Rail train was out of the country for months before his arrest, and U.S. authorities alerted the RCMP that he was on his way back to Canada.

CTV News has learned that Chiheb Esseghaier was travelling outside the country when, in December, the U.S. State Department’s counter-terrorism office asked Canadian authorities to inform them when he returned.

But instead, U.S. officials alerted the RCMP on April 4 that Esseghaier was on his way back to Canada. Canada Customs officials were instructed to allow him through. On April 6, sources told CTV, Esseghaier landed at Toronto’s Pearson International Airport without incident.

On Monday, RCMP arrested Esseghaier, 30, in Montreal and his co-accused, Raed Jaser, 35, in Toronto, on allegations that they were plotting to derail a Toronto-to-New York passenger train in Canada. Sources have told CTV News that the plan could have changed so the attack occurred on U.S. soil.

Both men face several terror-related charges in connection with the plot, and have been remanded in custody until their next court appearance on May 23.

Upon announcing the arrests, RCMP said while they believed the two men had the intent and the capacity to carry out the plan, there was no immediate threat to the public.

Investigators alleged that the two men received support from al Qaeda elements in Iran, but said the plan was not state-sponsored. Iran has denied any connection to the alleged plot.

Sources told CTV News that Esseghaier had travelled to Iran within the last two years and had met with two senior al Qaeda facilitators.

However, it is not known where Esseghaier was travelling in the months before his arrest. His parents still live in his native Tunisia, but there is no indication he was there.

“We do know the CIA was tracking (Esseghaier) throughout this period and sources say the CIA did not believe he was a tier-one terror suspect,” CTV’s Ottawa Bureau Chief Robert Fife reported Friday evening.

“But he posed a danger, and this might have been the reason why the RCMP moved so quickly to arrest him after he came back to Canada.”

In the United States, the subcommittee on counter-terrorism and intelligence plans to hold hearings into the plot. Sources say the two suspects had accomplices both in Canada and the United States.

“Senior al Qaeda people have been in Iran for some period of time. It has been convenient for Iran to have them there,” said Richard Daddario, deputy commissioner for counter-terrorism for the New York Police Department.

“They are united in being a common enemy of the United States.”

Meanwhile, Immigration Minister Jason Kenney has vowed to review Canada’s immigration policy in the wake of revelations that Jaser had been ordered deported but was not removed because he claimed to be a stateless Palestinian.

With a report from CTV’s Ottawa Bureau Chief Robert Fife