The man responsible for killing six Muslims inside a Quebec City mosque had been anxious for months about his own family becoming victims of a terror attack, and that peaked when he saw reports the Canadian government was going to allow more refugees into the country, a court heard Friday.

A video of Alexandre Bissonnette's interrogation was played in a Quebec City courtroom during the third day of sentencing hearings.

The public release of his three-hour conversation with Quebec City police Sgt. Steve Girard was the first insight into what Bissonnette was thinking the day he left his parents' home, armed with two semi-automatic weapons, on Jan. 29, 2017.

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

Dressed in a white jumpsuit, visibly agitated and crying throughout, Bissonnette told Girard he had watched television the day of the attack and had started drinking around noon.

"The Canadian government was, you know, going to take in more refugees, you know, those who couldn't go to the United States would end up here," Bissonnette told Girard.

Prime Minister Justin Trudeau tweeted on Jan. 28 that Canada would welcome refugees leaving the United States, because of President Donald Trump's commitment to tougher immigration policies.

To those fleeing persecution, terror & war, Canadians will welcome you, regardless of your faith. Diversity is our strength <a href="https://twitter.com/hashtag/WelcomeToCanada?src=hash&ref_src=twsrc%5Etfw">#WelcomeToCanada</a> —@JustinTrudeau

Bissonnette recounted how, in the months prior, he had become obsessed with the idea a terrorist attack in Quebec was imminent.

Asked by Girard why he chose to carry out his attack at a mosque, Bissonnnette replied he wanted to save people, that "maybe, thanks to what I did, there will be hundreds of people saved."

Bissonnette said he feared terrorist attacks like the ones against cities in Europe would start happening in Canada.

He told Girard he had been consumed for months by the thought his parents and his twin brother would be "killed by terrorists. I had to do something, it was torturing me inside."

History of anxiety, depression

Several times during the interrogation, Bissonnette asked Girard if his parents had been attacked.

"I have the impression they're in danger, are they OK?"

Despite the officer's promise they were safe, Bissonnette was agitated. "It's in my head and I can't get rid of it."

In the video, Bissonnette explained how he had dealt with depression and anxiety problems since the age of 14.

Alexandre Bissonnette told Sgt. Steve Girard he was trying save people when he shot and killed 6 people, and injured others, in a Quebec City mosque. 0:45

The morning after the attack was supposed to be Bissonnette's first day back at his job, at Héma-Québec, where he looked for potential donors for the organization, which manages the province's blood supply.

Three weeks earlier, Bissonnette received a medical note granting him leave from work because of an anxiety disorder.

He was prescribed Paroxetine, he said, to replace the Fluvoxamine pills he was taking, which he didn't think were strong enough.

"I couldn't go on, with my job and my studies," he said.

Bissonnette had several suicidal episodes since high school, he said, but never told anyone.

"I always dealt with my own problems," he said, explaining that he didn't want to worry his parents.

A few minutes after talking about the mosque shooting and his anti-immigration, anti-Muslim views, Bissonnette breaks into full body sobs. —@katemckenna8

When asked whether he had considered that he could go to prison for his crime, Bissonnette answered, "Well no, I was going to shoot myself."

Girard pressed on, asking him if he knew what he was about to do that day was wrong.

"It's not wrong, what I did. Like I told you, people have been saved, my family has been saved."