One of the two men accused of plotting with al-Qaeda members in Iran to derail a train in Canada has told a Toronto court that he does not recognise its jurisdiction.

"My comment is the following because all of those conclusions were taken out based on criminal code and all of us know that this criminal code is not a holy book," Chiheb Esseghaier said at the hearing on Wednesday.

"We cannot rely on the conclusions taken out from these judgments," he added.

The judge told Esseghaier to "save that for another court," and take the advice of his lawyers. He was given a May 23 court date.

Charges against Esseghaier, 30, and Raed Jaser, 35 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-Qaeda in Canada. The two could be sentenced to life in prison if convicted.

Law enforcement officials in the US said the target was a train that runs between New York City and Canada.

Canadian investigators say the two men received guidance from members of al-Qaeda in Iran. Iranian government officials say the government has nothing to do with the plot.

In a brief court appearance in Montreal on Tuesday, Esseghaier declined to be represented by a court appointed lawyer. He made a brief statement in French in which he rejected the allegations against him.

Esseghaier, who was arrested on Monday afternoon at a McDonald's restaurant in the train station, was later flown to Toronto for Wednesday's appearance in the city where his trial will take place.

More about the suspects

Jaser also appeared in court on Tuesday in Toronto and also did not enter a plea. He was given a new court date of May 23. The court granted a request by his lawyer, John Norris, for a publication ban on future evidence and testimony.

Law officials in New York with knowledge of the investigation told The Associated Press news agency the attack was to take place on the Canadian side of the border.

Jaser's lawyer said on Tuesday that his client 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.

Norris speaking outside the court said his client was "in a state of shock and disbelief."

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.

Esseghaier, in a profile on a university department website - which has since been removed - says he was born in Tunis, Tunisia.

The investigation surrounding the planned attack was part of a cross-border operation involving Canadian law enforcement agencies, the FBI and the US Department of Homeland Security.

Canadian police said the men never got close to carrying out the attack.

Source: Associated Press