A St. Paul police officer on trial for allegedly using excessive force has testified he thought the man he kicked had a gun.

Officer Brett Palkowitsch kicked Frank Baker on June 24, 2016, as Baker was being bitten by a police dog.

Officers responded to an anonymous report of a man with a gun, described as black and having dreadlocks. Baker, returning to his East Side apartment, fit the general description but was unarmed and was not the suspect.

Minnesota Public Radio News reported that Palkowitsch testified Wednesday in his federal civil rights trial in St. Paul that he delivered two kicks to Baker, whose right calf was in the jaws of the police dog.

Palkowitsch testified that Baker was moving around on the ground and wasn’t complying with the officers’ commands.

Palkowitsch said he made sure not to aim at Baker’s head.

As K-9 handler Brian Ficcadenti moved in to handcuff Baker, Palkowitsch said, he saw Baker “sit up” and move his hands down toward his waist.

Palkowitsch said he took that movement “as a threat” and delivered a third kick.

Federal prosecutors say Palkowitsch’s use of force against Baker was excessive. Baker’s ribs were fractured and his lungs punctured.

Palkowitsch has pleaded not guilty. He was fired by Police Chief Todd Axtell but reinstated following an appeal and a ruling by a state arbitrator. He is now on paid administrative leave.

Axtell suspended Ficcadenti for 30 days.

In 2017, Baker sued the city of St. Paul and settled the lawsuit for a record $2 million.