URBANA — A Rantoul teen found in possession of a loaded gun and cannabis in July has been sentenced to five years of probation and 100 hours of public service.

Judge Roger Webber sentenced the 17-year-old on Monday for armed violence, a crime that in the adult system would have meant a mandatory prison term of between six and 30 years.

The judge set a remission hearing for Dec. 23, warning the teen that if he was faltering in his probation, he would likely spend Christmas locked up.

The teen had pleaded guilty, admitting that on July 17 he had cannabis intended for sale at the same time he was armed with a loaded gun, which he said he carried for protection.

Rantoul police had been sent to the teen’s home to check the welfare of his mother and found him in a truck in the driveway with two bags of cannabis, a scale and the loaded gun.

At his sentencing, the teen declined to tell State’s Attorney Julia Rietz where he got the gun, saying it would be dangerous for him to do so. He conceded her point that if revealing where he got it was dangerous, then carrying it was not actually for his protection but put him in jeopardy.

The remorseful teen assured Webber he was on course to change for the better, demonstrating that by working, participating in online classes and not using drugs.