A Portland man has pleaded guilty and sentenced to six years in prison for the 2020 drive-by shooting at Portland’s police station.

Abdikareem Hassan, 33, entered guilty pleas on charges of reckless conduct with a dangerous weapon, possession of a firearm by a prohibited person, assault on a police officer, operating after license revocation and refusing to submit to arrest, according to the Cumberland County District Attorney’s office.

He received the 5-year maximum sentence on the charge of reckless conduct with a dangerous weapon and an additional 1-year charge of assault on a police officer, the office said.

Hassan was arrested about 11:30 p.m. on July 5, 2020, after police officers saw him strike a curb on Franklin Street, near the intersection with Cumberland Avenue. Martin said his vehicle matched the description of one sought in connection with a shooting at the Portland police station earlier that night.

No one was injured about 10:30 p.m. when several shots were fired into the Middle Street police station’s garage. One officer was inside at the time of the shooting.

Hassan became uncooperative while in custody, and he assaulted a Portland police officer and an FBI special agent and damaged a police vehicle, officials said.