A former Calgary court security guard has been sentenced to 11 years in prison for extortion and making and distributing child pornography.

Daniel Mackie pleaded guilty to 39 charges last August for luring more than 20 young children over the internet and getting them to send him nude photographs of themselves.

Mackie was originally charged with 77 offences in February 2012 as part of an investigation that went back to 2009.

Police said Mackie communicated with most victims through chat rooms, social media and webcams.

Mackie told psychiatrists that he committed the crimes for "the thrill of the hunt" and to "see how far kids would go."

With time already served, Mackie's sentence is now nine years and nine months.

He'll be back in court next Friday to face five charges dating back to the fall of 2007, which include indecent exposure and for the first time sexual assault, after a 13-year-old girl brought forward new complaints.