A tip from a Toronto imam sparked an investigation that culminated in the arrests of two men who allegedly plotted to derail a Via passenger train.

The imam alerted authorities more than a year ago about a person he regarded as an extremist who was corrupting youth in his community.

That single tip led to what the RCMP on Monday called the first-ever Canadian bust of an alleged al-Qaeda terrorist plot.

Story continues below advertisement

The RCMP believes that two men, Chiheb Esseghaier, 30, and Raed Jaser, 35, were planning to derail a Via passenger train on the Canadian leg of its Toronto-New York route. The actual imam who phoned in the initial tip to authorities remains anonymous. But community sources confirm his involvement.

"More than a year ago, a client of mine, an imam in the Toronto Muslim community, became concerned after noticing the activities of one of the individuals now under arrest," Toronto lawyer Naseer Syed told The Globe and Mail, referring to notes he had taken last year.

The men were taken into custody Monday in Montreal and Toronto. They face several criminal charges, including plotting murder, terrorist recruitment and terrorism.

Detectives, who spent months on the case, claimed the duo relied on "direction and guidance" from al-Qaeda-affiliated terrorists in Iran as they plotted carnage in Canada. One Canadian detective called the train scheme "the first known al-Qaeda plan of attack that we've experienced."

The nation's top counterterrorism police officials briefed reporters about the arrest Monday, but not before they made a point of summoning about 20 leaders of Toronto's Islamic community to a meeting.

The message from authorities to the Muslim community? Thank you for a helping hand.

"The first comment they made, and they encouraged us to make it a talking point, is that, but for the Muslim community's intervention, we may not have had the success we've had," said Hussein Hamdani, a lawyer who was invited to the pre-briefing.

Story continues below advertisement

Because the Toronto suspect was allegedly seen trying to spread extremist propaganda to youth, the imam felt obliged to alert the Canadian Security Intelligence Service and RCMP to these activities.

Alarmed by Mr. Jaser's "attempts to approach young Muslims," the imam "took the initiative to notify the authorities." Mr. Syed said.

The two suspects are to appear in court on Tuesday.

While the RCMP has been investigating the pair since last fall, public details about the two men remain vague. The Mounties did reveal that neither man is a Canadian citizen, but refrained from releasing their nationalities.

It is unknown how Mr. Esseghaier and Mr. Jaser met or began hatching the alleged plot. What is known suggests contrasting backgrounds.

Born in Tunis, Tunisia, Mr. Esseghaier came to Canada in the summer of 2010. His first stop was Sherbrooke, Que, where he arrived at Jean-Luc Brodeur's apartment building at 2748 Galt looking for a place to live. Mr. Brodeur said the young man spoke impeccable French and told him he would be studying at the University of Sherbrooke.

Story continues below advertisement

"Those are the magic words to me. We know they're generally good kids who pay their rent," Mr. Brodeur said.

Mr. Esseghaier kept to himself during his short stay and caused no trouble, Mr. Brodeur said. He moved to Montreal in November that year to continue his studies and sublet his apartment to avoid breaking his lease, which ran to July 1.

"The bills were paid and everything went fine," said Mr. Brodeur. "This is very hard to understand."

Mr. Esseghaier's new school was the Institut National de la Recherche Scientifique (INRS) in a Montreal suburb, according to his biography on the school's website, which was expunged later in the day.

Mr. Esseghaier joined a laboratory group to study optical and electrochemical biosensors. He was working toward a PhD. Esen Sokullu, who was in the same lab group, said she was shocked to hear the news. "I never expected to hear something like that. He was very nice," she said.

At the research institute he attended in suburban Montreal, Mr. Esseghaier was recalled as a serious man who spent long days in the lab, often leaving campus at 9 p.m.

Story continues below advertisement

Nothing in Mr. Esseghaier's behaviour raised suspicions, said two fellow students who declined to give their names. Both said they hadn't seen him on the campus for several months, perhaps since before Christmas.

"He was discreet," said one researcher as he left the low-slung building in Varennes. "But nothing he did seemed suspicious. He seemed like an ordinary guy."

News of the arrest spread quickly through the series of labs and offices, and some staffers slipped out quickly to their cars to avoid speaking to journalists.

Far less is known about Mr. Esseghaier's alleged partner.

Yellow police tape surrounded the east-end Toronto duplex where Mr. Jaser is believed to live Monday evening, as a white RCMP truck and a Toronto police cruiser stood parked outside.

The police arrived some time after 11:30 a.m., when next-door neighbour Sanjay Chaudhary left his home for a few hours. When Mr. Chaudhary returned around 3 p.m., a detective quizzed him about his neighbours, asking him if he had ever seen any suspicious behaviour.

Story continues below advertisement

"I never saw anything suspicious," Mr. Chaudhary told reporters on his doorstep.

He described his neighbours, a man and a woman in their 30s, as reserved, never saying hello on their shared driveway. The pair were renting the back apartment of the semi-attached duplex next to Mr. Chaudhary. They were already residents of the quiet neighbourhood when Mr. Chaudhary and his family moved in one year ago.

The couple kept their blinds constantly closed and left their home each morning around 5 a.m. for Islamic prayers, Mr. Chaudhary said. They would generally return about an hour later.

Mr. Chaudhray doesn't believe the man worked. He said his neighbour was about five feet, 10 inches tall, chubby, with a long, dark beard that hit mid-chest. Mr. Chaudhary said the man's wife was covered head to toe in black, only exposing her eyes.

He was shocked to learn about the allegations facing his neighbour. He last saw the couple pull into their home around 9:30 p.m. Sunday in a white Lincoln vehicle.

They were kind of reserved, I think. I never saw him talking to anybody except his [landlord]," Mr. Chaudhary said. "Even if I am starting my car and he is starting his car, even then he would never say hi, hello. Never. We never had any conversation."

Story continues below advertisement

For Mr. Chaudhary, one event stands out. Last spring, around May and June, he recalls about five or six men in their 30s were at the home constantly, sitting outside in the backyard, eating and "partying" with the couple on Fridays. And then, after about a month, the visitors were gone.

With reports from Les Perreaux, Omar El Akkad, Renata D'Aliesio, Tu Thanh Ha, Ingrid Peretz and Daniel Leblanc