LLICOTT CITY, Md. (AP) — A man who was shot by a police officer while brandishing a knife in a Columbia store has pleaded guilty to assault and reckless endangerment.

Howard Carvel Smith, 33, of Columbia entered the plea in Howard County Circuit Court on Wednesday. He was sentenced to three years in prison.

READ MORE: Baltimore Ravens Continue Shoring Up Secondary With Addition Of CB Kyle Fuller

Prosecutors say on July 10, Smith pulled a knife on an employee at BJ’s Wholesale Club after the employee confronted him about shoplifting. Authorities say Smith fled the store, tried to get on a bus, and ran back into the store.

READ MORE: Franchot Calls For Special Session To Halt Maryland Gas Tax Hike, Implement 4-Month Gas Tax Holiday

Prosecutors say a Howard County police officer confronted Smith and repeatedly ordered him to drop the knife. Authorities say Smith refused, and the officer shot Smith.

Smith’s lawyer said that Smith was hospitalized for two months after the shooting.

MORE NEWS: NOAA Predicts 14-21 Named Storms For Atlantic Hurricane Season

(Copyright 2013 by The Associated Press. All Rights Reserved.)