WARNING: This story contains details some readers may find disturbing.

In 90 seconds on Jan. 29, 2017, 17 children lost their fathers, six wives lost their husbands, and many lives were changed forever.

The victims' final moments in a Quebec City mosque were caught on surveillance video, which was shown in a Quebec City courtroom on Wednesday, where the man who pleaded guilty to these murders, Alexandre Bissonnette, is waiting to be sentenced.

Bissonnette pleaded guilty on March 28 to six first-degree murder charges and six counts of attempted murder.

The videos, submitted as evidence at the sentencing hearing, retrace the steps the 28-year-old took that evening — from the moment he drew a semi-automatic pistol outside the mosque, just after 7:54 p.m., to the moment he ran away less than two minutes later.

Widows of the men killed in the attack sat in the audience, determined to witness their husbands' final moments despite the judge's recommendation that they step out.

Mosque shooter Alexandre Bissonnette is escorted to a van after appearing in court on Jan. 30 in Quebec City. His sentencing hearing was scheduled to continue Thursday. (Jacques Boissinot/Canadian Press) Quebec Superior Court Justice François Huot spoke directly to the families as the sentencing hearing opened, saying that having seen the videos, he advised they spare themselves the pain of seeing those images.

"They are difficult, brutal, and in my humble opinion will bring you little comfort in the healing process you have embarked on."

The raw footage, at times blurry, sparked waves of emotion as Crown prosecutor Thomas Jacques described their content.

The wife of Mamadou Tanou Barry cried softly as she watched Bissonnette aim a semi-automatic rifle at her husband, as he left the building with his friend and neighbour, Ibrahima Barry.

They huddled together in the January cold, trying to back away from Bissonnette as the rifle jammed.

That gun, which would have allowed Bissonnette to fire 29 bullets before having to reload, was left on the ground and was never used.

Bissonnette took a 9-millimetre pistol out of his coat pocket, before going back to shoot both his victims at close range, as they lay in the snow.

48 bullets

Once inside the unlocked building, Bissonnette went through five magazines each containing 10 bullets.

He retreated to the entrance of the mosque each time he reloaded, as the men, along with four children, scrambled to find shelter in the vast prayer room.

Three of the children were sitting on the floor just feet away from the main doorway only moments before Bissonnette entered the room, but were brought to the back when people heard gunshots outside.

A fourth child ran around the room for several agonizing seconds, desperate to find a place to hide.

Six men died in the attack on the Quebec Mosque. They are, clockwise from left, Mamadou Tanou Barry, Azzedine Soufiane, Abdelkrim Hassane, Ibrahima Barry, Aboubaker Thabti and Khaled Belkacemi. (CBC) Those in the courtroom, including several witnesses and survivors of the attack, cried out as they saw Azzeddine Soufiane fall to the ground after he rushed to the entrance to try to disarm Bissonnette.

Soufiane, a pillar in the community who was described as someone who helped all those who needed it, died of several gunshot wounds. Several were fired at close range.

The former president of the mosque, Mohamed Labidi, said there were no words to describe what he saw in the courtroom.

"It's savagery, cold blood," he said afterwards.

Nonetheless, like others who chose to stay in court to watch the footage, Labidi said he needed to "see the truth, the reality of what happened."

"I also wanted to see the heroic actions of people like Azzeddine Soufiane. He literally gave his life for others."

Survivor Aymen Derbali now uses a wheelchair. He remained in the courtroom Wednesday to watch the videos of the attack, in which he was shot seven times. (Julia Page/CBC) Saïd Akjour, who was shot in the arm and seriously wounded, also ran up to the corridor from which Bissonnette was shooting, without knowing he had left the building for good only seconds before.

The outdoor images also show how Mohamed Belkhadir, who was later mistakenly arrested by police, was the first to discover the bodies of Mamadou Tanou Barry and Ibrahima Barry.

He took off his heavy winter coat and placed it over one of the victims, who he thought had a chance of surviving, as he tried to reach 911 on his cellphone.

Police arrived seconds later, before 8 p.m.

The Crown said at this point Belkhadir ran away when he saw people arriving with guns drawn.

"Thinking it was the person responsible for the massacre, he ran away," Jacques said.

Belkhadir was released the next day.

Footage cannot be made public

The videos shown in court Wednesday cannot be made public. Everyone in the courtroom had to hand in their cellphones so that no audio or video recordings could be made.

Earlier this week, a media consortium, which includes CBC News, argued in a Quebec court that the video taken that night should not be placed under a publication ban, based on the public's right to transparent information.

Huot disagreed, ruling that in this circumstance, the security of the families of the victims, the Muslim community and Quebec society as a whole outweighed the public's right to information.

"There is a very clear distinction between morbid curiosity and the public's right to information," Huot said.

Harshest sentence in Canada?

Bissonnette hardly looked up from the floor from his prisoner's box during the viewing of the videos.

He was scheduled to be back in court Thursday morning when the Crown resumes its sentencing arguments. The hearing, which is expected to last about three weeks, could result in the harshest prison sentence in Canadian history since the abolition of the death penalty in 1976 .

A first-degree murder conviction comes with an automatic life sentence, with no eligibility for parole for 25 years.

Alexandre Bissonnette's lawyer, Charles-Olivier Gosselin, hopes to avoid consecutive life sentences for his client. (Julia Page/CBC) However, Bissonnette may never be released from prison if he is handed six life sentences back-to-back with no chance of parole. That would make him ineligible for parole for 150 years.

Lawyer Charles-Olivier Gosselin wants his client to serve his six life terms all at once, instead of consecutively, and for him to be eligible for parole once he's served 25 years behind bars.

Bissonnette's trial was initially expected to last several weeks but was unexpectedly cut short when he entered a guilty plea, surprising many after he had initially pleaded not guilty on all charges.