A man accused of plotting with al Qaida members in Iran to derail a train in Canada has rejected the charges and said authorities were basing their conclusions on appearances.
Law enforcement officials in the US said the target was a train between New York City and Canada.
Canadian investigators say Raed Jaser, 35, and his suspected accomplice Chiheb Esseghaier, 30, received guidance - but no money - from members of al Qaida in Iran.
Tehran released a statement saying it had nothing to do with the plot, even though there were no claims in Canada that the attacks were sponsored directly by Iran.
"We oppose any terrorist and violent action that would jeopardise lives of innocent people," Iranian foreign ministry spokesman Ramin Mehmanparast said.
Mehmanparast described the alleged link as "part of Islamophobic and Iranphobic campaigns."
Iran's Foreign Minister Ali Akbar Salehi said: "In my 64 years of age, I have not heard anything as ridiculous as this.”
Charges against the two men in Canada include conspiring to carry out an attack and murder people in association with a terrorist group. Police - tipped off by an imam worried by the behaviour of one of the suspects - said it was the first known attack planned by al Qaida in Canada.
Law officials in New York said the attack was to take place on the Canadian side of the border.
Amtrak and Via Rail Canada jointly operate routes between the United States and Canada, including the Maple Leaf from New York City to Toronto.
New York mayor Michael Bloomberg said Canada had kept his office posted on the investigation.
"I can just tell you that you are probably safer in New York City than you are in any other big city," he told reporters.
In a brief court appearance in Montreal, a bearded Esseghaier declined to be represented by a court-appointed lawyer. He made a brief statement in French in which he called the allegations against him unfair.
"The conclusions were made based on facts and words which are only appearances," he said in a calm voice after asking permission to speak.
Jaser appeared in court earlier in Toronto and also did not enter a plea. He was given a new court date of May 23. He had a long beard, wore a black shirt with no tie, and was accompanied by his parents and brother. The court granted a request by his lawyer, John Norris, for a publication ban on future evidence and testimony.
Mr Norris questioned the timing of the arrests, pointing to ongoing debates in the Canadian parliament over a new anti-terrorism law that would expand the powers of police and intelligence agencies.
He said his client would "defend himself vigorously" against the accusations, and noted Jaser was a permanent resident of Canada who has lived there for 20 years. Mr Norris refused to say where Jaser was from, saying that revealing his nationality in the current climate amounted to demonising him.
Canadian police also declined to release the men's nationalities, saying only they had been in Canada a "significant amount of time".
Muslim community leaders who were briefed by Canadian police ahead of the announcement of the arrest said they were told one of the suspects is Tunisian and the other from the United Arab Emirates.
Esseghaier's LinkedIn profile lists him as having studied in Tunisia before moving to Canada, where he was pursuing a PhD in nanotechnology at the National Institute of Scientific Research, a spokeswoman at the training university confirmed.
In Abu Dhabi, a UAE source informed about the attack plot said there was "no UAE citizen" with the name Raed Jaser.