OTTAWA -- A national Muslim group and community leaders are thanking police for foiling an alleged terror plot against a Via Rail train.

The plot had nothing to do with the Muslim community as a whole, said Ihsaan Gardee, executive director of the Canadian version of the Council on American-Islamic Relations.

"We would like to praise the law enforcement authorities involved for thwarting this alleged terror attack," Gardee told a Parliament Hill news conference with local Muslim leaders.

"Canadian Muslims have and will continue to unequivocally denounce this or any other alleged terror plots by individuals who distort and pervert our faith to further their own political goals or personal agendas."

He also pointed out that the initial tip in the case came from within the Muslim community, apparently from an imam worried about radicalization.

Imam Sami Metwally of the Ottawa Main Mosque condemned the plot.

"We say that there is no justification in Islam to kill innocent people like what happened in Boston or to threaten people's lives in any way like what we saw here in Canada," Metwally said.

"While we are thanking the RCMP and the imam who reported this, I would like to say that it's a religious duty from an Islamic perspective to speak up against anything that might put people's lives in danger."

Gardee said he isn't worried about a backlash against Muslims.

"We fully trust that our fellow citizens will see this for what it is, the alleged criminal and misguided actions of a few who do not reflect or represent Canadian Muslim communities."

He said he has a simple message for those who might engage in criminal activity: "You have nothing to do with our faith."

The two men charged in the alleged plot, which police say was supported by elements of al-Qaida, appeared in court separately Tuesday -- Raed Jaser, 35, in Toronto and Chiheb Esseghaier, 30, in Montreal.

Police allege the two men had "direction and guidance" from al-Qaida members in Iran -- a claim that has raised eyebrows in foreign-policy circles.