One of the suspects in an alleged al-Qaida terror plot to derail a Canadian passenger train claimed in court on Tuesday that the charges against him were unfair – and based merely "on appearances".

At a brief hearing in Montreal, prosecutors outlined the accusations against Chiheb Esseghaier, 30. His alleged accomplice, Raed Jaser, 35, made a separate court appearance in Toronto. Charges against the pair include conspiring to carry out an attack and murder people in association with a terrorist group. Both are accused of receiving "directions and guidance" from members of al-Qaida in Iran.

Wearing a dark navy sports jacket and glasses, and a long thick beard, Esseghaier, 30, calmly confirmed that he understood the charges. He said in French: "The conclusions have been made based on acts and words which are only appearances." The judge told him he would have a chance to address the charges in due course. He was sent to Toronto and will appear in court there later this week.

Esseghaier, a Tunisian doctoral student at the Institut National de la Recherche Scientifique, has "no fixed" address, according to police documents. Richard Roy, public prosecutions of Canada in Montreal's Palais de la Justice, said Esseghaier declined an offer of representation by a court-appointed lawyer.

In Toronto, a judge imposed a publication ban on the hearing involving Jaser, but CBC reported that Jaser's lawyer, John Norris, had said Jaser was "in a state of shock and disbelief" and "anxious to see the evidence that the crown says it has against him". Norris said his client would "defend himself vigorously" against the accusations, and noted that his client is a permanent resident of Canada who has lived there for 20 years. He refused to say where Jaser was from, saying that revealing his nationality in the current climate amounted to demonizing him.

James Malizia, the assistant commissioner of the Royal Canadian Mounted Police, said the two men had direction and guidance from "al-Qaida elements located in Iran," though he has given little evidence of the link and has said there is no reason to think the planned attacks were state-sponsored.

Iran's foreign minister, Ali Akbar Salehi, rejected as "ridiculous" Canada's claim that the two arrested were backed by al-Qaida in Iran. Al-Qaida's relationship with Iran's government has often been fractious. Salehi, in remarks quoted by the ISNA state news agency, said: "If the news that you are announcing is true, this is the most hilarious thing I've heard in my 64 years. We hope Canadian officials show a little wisdom and pay attention to the world's public opinion and intelligence."

Canada severed diplomatic relations with Tehran and expelled Iranian diplomats in September 2012. Canada's foreign minister, John Baird, called Iran "the most significant threat to global peace and security in the world today".

Opposition MPs and political analysts have expressed suspicion at the timing of the arrests, a week after the Boston bombings and the same day as a the House of Commons in Canada debated a controversial anti-terrorism bill. The Combating Terrorism Act, or Bill S-7, which was put into effect after 9/11, was never used and fell into abeyance, due to a "sunset" provision, five years ago. It could be reinstated by Tuesday night, if the government gains enough support. It would allow secret trials, pre-emptive detention and expansive security and surveillance powers. Its critics say it is as incompatible with the Canadian Charter of Rights and Freedoms.

The RCMP has said that the alleged plot was in the planning stage, but was not imminent. On Monday, Jennifer Strachan, the RCMP chief superintendent, said: "We are alleging that these two individuals took steps and conducted activities to initiate a terrorist attack. They watched trains and railways."

Strachan said Esseghaier and Jaser were targeting a route, but did not say which one. Via Rail, which operates cross-border services to New York in partnership with Amtrak, said that "at no time" were passengers or members of the public in imminent danger. In Washington, Amtrak president Joe Boardman said the Amtrak police department would continue to work with Canadian authorities to assist in the investigation.