QUEBEC CITY -- The man accused in the slayings of six men at a Quebec City mosque has changed his mind and pleaded guilty. Alexandre Bissonnette originally pleaded not guilty to the 12 charges Monday morning but that afternoon announced he wanted to plead guilty.

Superior Court Justice Francois Huot refused to accept the pleas Monday pending a psychiatric assessment of the accused to ensure he fully understood the consequences of his decision. Huot placed a publication ban on Monday afternoon's proceedings but agreed Wednesday to accept the 12 guilty pleas.

Bissonnette faced six charges of first-degree murder and six of attempted murder. More than 50 people were at the Islamic Cultural Centre in January 2017 when the shooting began during evening prayers. Six men aged between 39 and 60 were killed.

Get Breaking News Delivered to Your Inbox

Bissonnette said he didn't want the families to have to "relive the tragedy."

Bissonnette told Huot on Monday he had been thinking for some time of pleading guilty but that he was missing certain pieces of evidence, which were relayed Sunday.

"In my heart, it's the decision I've made," Bissonnette said.

When Huot asked him if he was fully aware of what he was doing, Bissonnette replied, "Yes."

Huot asked Bissonnette whether he knew he would be getting a life sentence and he answered, "I understand."

Jury selection was scheduled to start April 3 and the trial to last two months.

Many members of Quebec City's Muslim community were present in court Monday and Wednesday.