Updated

A former middle school principal pleaded guilty Tuesday to buying crack cocaine in his office and was sentenced to a year in jail.

Anthony Giancola, 41, of St. Petersburg, was arrested in February when he made a deal to buy $20 worth of crack cocaine from an undercover officer while students were still on campus at Van Buren Middle School.

Giancola was sentenced to 364 days in the county jail. If he completes a drug-treatment program in jail, the remainder of the sentence will be suspended.

Giancola, who also got three years probation, 200 hours of community service and must forfeit his teaching license, apologized afterward.

"I can't express how sorry I am," he told reporters. "During my period of active addiction, the only person I was really trying to hurt was myself. I came to find out that I really hurt a lot of other people that mean the world to me."

Giancola, a 16-year veteran educator, pleaded guilty to purchasing cocaine on school property, possession of cocaine and possession of less than 20 grams of cannabis. He was given until June 30 to turn himself in to begin serving the sentence.