KEY WEST (CBSMiami) – A 16-year-old boy who reportedly stole a gun and brought it loaded to Key West High School earlier this year pleaded “no contest” to possession of a weapon on school property, burglary of a vehicle, and grand theft of a firearm.

A judge sentenced Matthew Whitener to 364 days in the Monroe County Detention Center followed by four years of probation. He is also required to undergo a psychological evaluation and perform 100 hours of community service.

READ MORE: Florida Gov. DeSantis Approves First Responders PTSD Measure

Whitener is also banned from all Monroe County School District properties.

READ MORE: Florida Gov. DeSantis Signs Bill On Gopher Tortoise Sites

On April 12th, a Key West police department acting school resource officer was called to the school’s office about a student on campus with a gun. They took Whitener and his book bag out of class and brought him to the office. Inside the bag was the firearm, a Walther PK380, with a bullet in the chamber.

Whitener originally told police he was “holding the gun for someone” else but changed his tune when police told him they would run the gun’s serial number through national computers to see if it was stolen. He then told police the weapon would come back as stolen “since he had stolen it from a car in Summerland Key.”

MORE NEWS: Police Will Be Out In Force In Miami Beach To Ensure A Safe Memorial Day Holiday

The gun’s owner reported it missing on April 13. He told deputies he normally leaves it on his nightstand but the previous day, he had traveled and took it with him and left it in his car. He usually locks his car but his daughter had gone into it the night before to retrieve a school book and apparently left it unlocked. He looked for the gun all morning, then called the Sheriff’s Office when he determined it was gone.