Nearly five years after he was convicted of sex offences, Dan Magda was sentenced to an indefinite prison stay.

Complicating the case was that the Crown sought to have Magda designated as a dangerous offender – a rare move used when authorities believe a criminal is at a very high risk of reoffending.

Magda was convicted in 2012 of eight sex offences including making child pornography. His crimes involved two young boys – one of whom was three years old.

At the time of the abuse, he had already spent time in prison for sexual assault of three young boys in the 1990s.

He was convicted of those offences in 2007, and enrolled in an abuse treatment program while in custody. Although doctors saw “very little progress” in terms of him accepting responsibility for his crimes, he was released from jail for good behaviour after eight months.

Court documents show that Magda quickly returned to his prior life of drugs and abuse while deceiving his parole officer about his activities.

On Thursday, the case of the latest abuse came to an end in court with Justice Michael Epstein declaring Magda a dangerous offender.

The judge noted that Magda had “shown a failure to restrain his behaviour,” and seemed to be targeting “vulnerable” boys seeking a father figure in their life.

Magda, now 42, will remain in custody unless correctional officials come to believe he is no longer such a high risk to reoffend.

With reporting by Nicole Lampa