QUEBEC — A former chemistry teacher sentenced to six months in prison on child pornography charges is dead after allegedly trying to commit suicide in front of a judge.

Nicolas Boudreau swallowed an unidentified liquid substance Wednesday morning right after a Quebec Court judge read his sentence.

Courtroom constables tried to revive the man while they waited for an ambulance.

Quebec City police confirmed today that Boudreau, 52, died after he was transported to hospital.

He was found guilty in April 2016 of possession of child pornography and having access to child pornography.

Boudreau was arrested in March 2013 during a police raid that involved four other people.

Thousand of photos and videos of child pornography were allegedly found at his home.