Canadian police said on Monday they had arrested and charged two men with an "al Qaeda-supported" plot to derail a passenger train.
"Had this plot been carried out, it would have resulted in innocent people being killed or seriously injured," Royal Canadian Mounted Police official James Malizia told reporters in Toronto.
The RCMP said it had arrested Chiheb Esseghaier, 30, of Montreal, and Raed Jaser, 35, of Toronto in connection with the plot, which authorities said was not linked to the Boston Marathon bombings, but likely had connections to al-Qaeda.
Neither is a Canadian citizen.
"The RCMP is alleging that Chiheb Esseghaier and Raed Jaser were conspiring to carry out an al Qaeda-supported attack against a VIA passenger train," Malizia said.
VIA is Canada's equivalent of Amtrak, operating passenger rail services in Canada.
U.S. officials said the attack would have targeted a rail line between New York and Toronto, but Canadian police did not confirm that.
Police said various Canadian security forces had conducted joint operations in the two cities.
The arrests follow not only last Monday's Boston Marathon bombings in which three people were killed and more than 200 injured but revelations that Canadians took part in an attack by militants on a gas plant in Algeria in January.
It also recalls the arrests in 2006 of a group of more than a dozen Toronto-area men accused of planning to plant bombs at various Canadian targets. Eleven men were eventually convicted of taking part on the plot.
"Today's arrests demonstrate that terrorism continues to be a real threat to Canada," Public Safety Minister Vic Toews told reporters in Ottawa.
"Canada will not tolerate terrorist activity and we will not be used as a safe haven for terrorists or those who support terrorist activities."