Open this photo in gallery Alexandre Bissonnette, a suspect in a shooting at a Quebec City mosque, is seen in a Facebook posting. HANDOUT/Reuters

The man who stormed a Quebec City mosque told police in the hours after the deadly attack that he was moved to act by the news of the day: U.S. President Donald Trump’s restrictions on Muslim travel to the United States, and Prime Minister Justin Trudeau’s subsequent expression of open arms to refugees.

Alexandre Bissonnette has pleaded guilty to killing six men and seriously wounding five more in the attack. In an interview with police played at his sentencing hearing on Friday, he said he started thinking about taking action as his own fear and anxiety grew after a soldier was shot on Parliament Hill in 2014. He became obsessed with the idea after a 2016 vehicle attack killed 86 people in Nice, France.

He said during the interrogation that the final straw came on Sunday, Jan. 29, 2017, when he watched news coverage of Mr. Trump’s new anti-Muslim policy and contrasted it with Canadian openness to immigration contained in one tweet seen around the world. Mr. Trudeau wrote: “To those fleeing persecution, terror & war, Canadians will welcome you, regardless of your faith. Diversity is our strength #WelcomeToCanada.”

Story continues below advertisement

Mr. Bissonette was horrified, he told Sûreté du Québec Sergeant Steve Girard, who had asked if Jan. 29 had a particular significance.

Related: In chilling footage of Quebec mosque shooting, a widow finds solace and a testament to her husband’s bravery

Read more: Quebec City mosque shooter Alexandre Bissonnette confessed during 911 call, court hears

“I was watching TV and I learned that the Canadian government was going to take more refugees, you know, who couldn’t go to the United States, and they were coming here,” Mr. Bissonnette said. “I saw that and I, like, lost my mind. It was then that I decided it was time to go.”

He added: “You know, I don’t want us to become like Europe. I saw that and, you know, they’re going to kill my parents, my family, me, too. I had to do something, I couldn’t do nothing. It was something that tortured me.”

The gunman who killed six men at a Quebec City mosque told police he believed his family was at risk of terrorist attack. Alexandre Bissonnette’s January 2017 police interrogation video is being played at his sentencing hearing. The Canadian Press

Mr. Bissonnette then listed countries that have had Islamist attacks: Germany, France, Belgium, the Netherlands, Norway and Italy. “I didn’t want it to come here.”

Later that Sunday – two days after the Trump Muslim travel restrictions, one day after the Trudeau tweet – Mr. Bissonnette went to the Grand Mosque of Quebec City, where about 53 worshippers were wrapping up evening prayer. Among them were shopkeepers, a university professor, provincial civil servants, students and small children, none of whom he had ever met. He fired 48 rounds over a three-minute spree.

Mr. Bissonnette pleaded guilty to first-degree murder and now a judge is considering how long he should have to wait to seek parole, or if he should be eligible at all. The minimum is 25 years.

Immediately after the attack, many people sought answers to the basic question: Why?

Story continues below advertisement

Acquaintances had said Mr. Bissonnette had anti-immigration views. In the months before he struck, he had posted images evoking the Christian Crusades against Muslims on social media. Friends said he had a grievance against a Muslim classmate. But beyond that, an information vacuum spawned debates over the meaning of Islamophobia and the word “terrorism” and whether they applied to the case.

A three-hour video of the police interview, completed the day after the attack, offered clear answers in the murderer’s words: His act was born of fear of Muslims and involved violence with a political motive (in this case opposition to immigration), which is the dictionary definition of terrorism. However, prosecutors declined to charge him with that crime, opting instead for a simpler murder prosecution. A murder conviction carries the severest consequences in Canadian law.

The interview with Sgt. Girard started with nearly two hours of Mr. Bissonnette sobbing and offering short answers to simple questions. At times, he said he did not wish to talk. The police interrogator gently inquired about his job, his studies, his family and his detention, drawing him out slowly.

They also discussed his mental health. Mr. Bissonnette, 28, had been diagnosed with anxiety and said he had suicidal thoughts from the age of 14. He was taking the drug Paxil and was just ending sick leave from work. In the video, he fidgets and plays with his hair constantly.

He lamented drinking while he was on his anti-anxiety medication, saying he drank sake on the evening of the attack. He said he was in fine condition to drive that night, but blamed the alcohol for his act: “If I hadn’t drank yesterday, I wouldn’t be here.”

Then the conversation turned to politics. Mr. Bissonnette was reluctant at first to talk about Canada, saying it is best not to talk about politics or religion.

Story continues below advertisement

But he became more animated when the topic turned to the United States. He said Mr. Trump’s election was a sign of the times and that he agreed with the U.S. President on immigration. (In a bizarre twist that came about the same time the non-observant Catholic was confessing, a White House official in Washington was using the mosque shooting as justification for the Muslim travel ban on the mistaken belief it was an Islamist attack.)

The officer asked the killer why he chose “that place” for the attack. “I wanted to save people,” Mr. Bissonnette said. “I told myself that maybe because of what I was doing, maybe 100 people would be saved. Maybe 200, maybe 300. You never know.”

Throughout the confession, Mr. Bissonnette attempted to minimize his act. “I’m not a monster,” he said. He inquired about the children at the scene and expressed relief none of the four were struck by bullets.

Mr. Bissonnette, who conducted the attack with a 9-mm pistol after abandoning a semi-automatic rifle loaded with an illegal 30-round magazine, told the investigator he dropped the rifle because he did not want to cause the extra damage high-velocity rounds inflict.

The court has heard that he tried to use the weapon, but a police ballistics report showed the first round misfired.

The killer seemed insulted when the police officer said he might be charged with terrorism along with murder and attempted murder. “When you say terrorism, I’m not a terrorist,” Mr. Bissonnette said.

Story continues below advertisement

The sentencing hearing continues next week and will include victim-impact statements from the wounded and the families of the dead.