Image copyright Facebook Image caption A picture circulated by local media of a man identified as Alexandre Bissonnette

The Quebec City mosque shooter told police he launched his attack because he feared Canada's immigration policy after Donald Trump's "Muslim ban".

The day before the January 2017 shooting, Prime Minister Justin Trudeau tweeted his support of refugees.

A Canadian court watched Alexandre Bissonnette's police confession during his sentencing hearing on Friday.

The 28-year-old pleaded guilty to six counts of first-degree murder and six counts of attempted murder in March.

Bissonnette stormed into the Quebec Islamic Cultural Centre on 29 January, 2017, and opened fire, killing six Muslims. Five others were seriously injured.

In the video of the police confession, which was taped the day after the mosque attack, Bissonnette said he feared there would be another terrorist attack in Canada, like the one on Parliament Hill in 2014 or the one in Nice, France in July 2016.

He said he was pushed to act then because he saw television coverage of Mr Trudeau's intention to bring more immigrants into Canada after the US president announced he would be halting all refugee admissions and temporarily barring people from seven Muslim-majority countries.

"Yes, I was listening to TV, and we knew that the Canadian government was going to take more refugees, those who would not be admitted to the United States would be here. And there, I lost the map, " Bissonnette said during his confession.

"I saw that and they will kill my parents, my family and me too. I was sure of that. I had to do something," he said. "I could not do anything. It's something that tortured me. It's been months that it tortures me. Every day, I am worried, anxious through the ceiling. I do not know what to do. I want to kill myself because of that."

Last year on 28 January, Mr Trudeau told refugees in a tweet "Canadians will welcome you, regardless of your faith".

It was retweeted 418,000 times, liked by over 768,000 Twitter users, and received widespread media coverage.

Bissonnette admitted during the confession he had mental health struggles, and had been prescribed medication to deal with anxiety. He had taken a three-week mental-health leave from work, he said, and was due to return on 30 January.

His sentencing hearing continues next week, when victims are expected to give their statements.