The suspect in the deadly attack on a Quebec City mosque was known in the city's activist circles as an online troll who was inspired by extreme right-wing French nationalists, stood up for U.S. President Donald Trump and was against immigration to Quebec – especially by Muslims.

Alexandre Bissonnette, 27, a student at Laval University, grew up on a quiet crescent in the Cap-Rouge suburb of Quebec City and lived in an apartment a few kilometres away.

His online profile and school friendships revealed little interest in extremist politics until last March, when France's far-right National Front Leader Marine Le Pen visited Quebec City, inspiring Mr. Bissonnette to vocal extreme online activism, according to people who clashed with him starting around this time.

Story continues below advertisement

Read more: One suspect in custody after six killed in 'terrorist attack' at Quebec mosque

Explainer: The Quebec City mosque attack: What we know so far

Related: Quebec City shooting was act of terror against Canada, Trudeau says

Vincent Boissoneault, a student in international relations at Laval University, knew Mr. Bissonnette from childhood and was friends with him on Facebook.

He said they frequently argued over politics when Mr. Bissonnette attacked refugees or expressed support for Ms. Le Pen or Mr. Trump.

In the wake of Sunday's attack, rumours about the identity of the attacker have run wild alongside speculation about motivation, ranging from white supremacy to Islamic terrorism.

"I can tell you he was certainly no Muslim convert," Mr. Boissoneault said. "I wrote him off as a xenophobe. I didn't even think of him as totally racist, but he was enthralled by a borderline racist nationalist movement.

Story continues below advertisement

"It never occurred to me he might be violent," Mr. Boissoneault added, referring to the hard-line anti-immigration sentiment growing in popularity in Europe and elsewhere.

François Deschamps, an employment counsellor who runs a refugee-support Facebook page, said he immediately recognized Mr. Bissonnette's photo from his frequent appearances online, including on the page he administers.

"He was someone who made frequent extreme comments in social media denigrating refugees and feminism. It wasn't outright hate, rather part of this new nationalist conservative identity movement that is more intolerant than hateful."

Both Mr. Boissoneault and Mr. Deschamps recalled Mr. Bissonnette sharing anti-immigration sentiment, especially toward Muslim refugees making their way to Europe from the war-torn Middle East.

Mr. Bissonnette's Facebook profile was removed from public view just after 11 a.m. Monday along with his comments on other social-media feeds.

In addition to being a student, Mr. Bissonnette worked in a call centre for Quebec's blood donation agency, Héma-Québec. "These events have sent a shock wave through the organization," the agency said in a news release. It was not clear how long he worked there.

Story continues below advertisement

Mr. Bissonnette lived on the top floor of a four-storey apartment in a complex of buildings filled with retirees and students. The complex on de la Verdure Street is one kilometre away from the mosque where the shooting took place and a 40-minute walk from the Laval campus.

Police searched the apartment Monday night and offered no details as they left.

Sarah-Jeanne Viau, who lived underneath the apartment, said she'd never seen who moved in last fall but there was "all kinds of noises. Steps, jumps, sometimes I'd hear a piano and often yelling."

Ms. Viau said Monday was one of the quieter evenings from the apartment above hers.

A couple of nights before the shooting, Ms. Viau said she and her boyfriend were awoken at 3 a.m. by yelling and loud banging from upstairs.

"It got to the point where I had trouble sleeping," Ms. Viau said. "It's such a ruckus."

Story continues below advertisement

Piano playing drifted down through her ceiling sometimes. "It was beautiful so I didn't mind it that much," Ms. Viau said, noting the melodies would last late into the night.

Other neighbours reported seeing Mr. Bissonnette's silver Mitsubishi in the parking lot, but not much of the man himself. Two men living across the hall said they didn't know who lived there but that it was often noisy.

Before Ms. Le Pen's visit, Mr. Bissonnette's friends say he showed little interest in politics, despite studying the subject at Laval University.

Former classmates from the CEGEP junior college he attended after high school described him as a quiet, unassuming guy who blended in. "It's scary that this would happen here," said one of the friends, Antoine Cabanac.

Michel Kingma-Lord, who grew up with Mr. Bissonnette in the Cap-Rouge neighbourhood, said he was "shocked" by the news that his erstwhile friend was suspected in a mass shooting. The two had grown apart in recent years, but spent many happy hours collecting minerals together as boys, scouring the schoolyard for bits of quartz.

"He was a really good guy," Mr. Kingma-Lord said. "A very generous kind of guy, always listening, polite."

Story continues below advertisement

Mr. Bissonnette studied political science, Mr. Kingma-Lord said, but seemed more interested in the campus chess club than any kind of ideology. "He never posted anything about hate speech," Mr. Kingma-Lord said.

"He wouldn't share any political ideology. When we talked, it was just normal talk."

Acquaintances from Mr. Bissonnette's earlier years at Les Compagnons-de-Cartier high school in Quebec City say he was introverted, socially awkward and frequently bullied. Toma Popescu remembered bigger kids teasing Mr. Bissonnette for his slight, pallid appearance and his unfashionable clothing. "He dressed like a country boy," Mr. Popescu said.

The bullies who targeted Mr. Bissonnette would demand his money and his lunch, even roughing him up, Mr. Popescu added. But Mikael Labrecque Berger said that Mr. Bissonnette wasn't cowed by his social problems at school.

"He never seemed to take it like personally," Mr. Berger said. "He had an almost happy attitude about it."

"Someone [would] tell him, 'You're ugly,' and he would say, 'You too are ugly.'"

Story continues below advertisement

Before it was removed, Mr. Bissonnette's Facebook page revealed normal preoccupations of young adulthood. While he "liked" the page of Ms. Le Pen and other right-wing politicians, he also liked Garfield and pop stars such as Katy Perry.

On Halloween, Mr. Bissonnette posted a picture of himself in a screaming ghoul costume – first popularized by the Scream horror-movie franchise. "Nothing original but it's a classic," he wrote.

He also posted a photo of himself wearing what appeared to be a cadet uniform several years ago.

A spokesman for the Canadian Forces confirmed that Mr. Bissonnette had participated in the cadet program from 2002 to 2004 in the Quebec City area.

Records show he bought a Chevy Malibu with his twin brother, Mathieu, in 2011. They were also chess-club teammates around that time.

Police searched a house belonging to Mr. Bissonnette's father, Raymond Bissonnette, on Monday morning.

The address showed up on several traffic tickets issued to Alexandre Bissonnette in recent years.

Police say the suspect was not on their radar before the attack. A search of court records shows no other involvement with police other than traffic tickets.

With reports from Verity Stevenson and Sean Gordon in Quebec City, Colin Freeze and Tu Thanh Ha in Toronto and Daniel Leblanc in Ottawa.