Before the blows came down on the homeless man who was handcuffed and in a seat belt in a police cruiser, the police corporal asked his colleague a question, according to court testimony.

“ ‘Do you have a camera in your car?’ ” Officer Carl Harper recalled Cpl. Stephen Downey asking him.

Harper said no. Then, according to Harper’s court testimony, Downey put on his gloves and began assaulting the handcuffed man during an expletive-laden rant punctuated by punches.

Ten months after the encounter, Downey, who opted for a trial by judge, was convicted of second-degree assault and misconduct in office.

Downey’s attorney declined to comment after the verdict Thursday but in court said the Prince George’s County officer’s use of force was appropriate to defend against what he perceived to be a head butt coming at him.

Downey was suspended after the incident and has been on administrative leave with pay, police said. At the time he was charged, Downey was a seven-year veteran of the department working patrol.

Prince George’s County State’s Attorney Aisha N. Braveboy said the credible testimony of the officers who were on the scene and reported Downey were key. “They were brave enough not only to report what they saw that night but to come to court to testify truthfully,” Braveboy said.

Andre Vincent Verdier, the victim in the case, thanked prosecutors and commended the officers who reported the incident.

“I know I had justice in this case, and I hope if it happened to anybody else that they get justice in theirs,” Verdier said after the verdict.

The case stems from Oct. 29, 2018, when county police responded to a CVS pharmacy in the Temple Hills, Md., area over an alarm at the store. When officers arrived, they found a homeless man had broken into a shipping container looking for a warm place to sleep, according to court testimony and prosecutors.

Officers took Verdier into custody and charged him with fourth-degree burglary in a case that was dropped, court files show. Officers handcuffed Verdier with his hands behind his back and then sat him in the front seat of a police cruiser restrained by a seat belt.

There was some exchange of words between Verdier and Downey before Downey then asked Harper about the equipment in the police car and started beating Verdier, prosecutors said in opening statements.

Downey’s attorney, Shaun F. Owens, said in opening statements that Verdier had been moving around “erratically” inside the cruiser and bashing his head around the onboard computer equipment.

Verdier then swore at Downey and tried to kick open the door of the cruiser, Owens said. Verdier managed to unbuckle his seat belt and jerked his head around, preparing to head butt Downey, Owens said. Downey then struck Verdier to defend himself, according to Owens.

Owens argued that Downey’s actions were “objectively reasonable” and that the use of force was justified. “This was a dynamic, very quick, rapidly evolving situation,” Owens said.

Owens tried to undermine Harper’s testimony and the account of a third officer who was at the scene, saying they both were behind the cruiser when Downey punched and couldn’t see Downey was about to be hit.

Harper testified the handcuffed man was “not at all” argumentative and started shifting around the vehicle after complaining that his handcuffs were too tight.

Prince George’s County Circuit Court Judge Ingrid M. Turner said she found credible the testimonies of Harper, the third officer at the scene and Verdier.

Verdier had been cooperative with police, and Downey “did not do what a reasonable officer would do,” Turner said in delivering the conviction.

Police brought the case to prosecutors after an internal investigation substantiated the allegations raised by officers who were with Downey that night, Police Chief Hank Stawinski said.

“The actions of this individual do not represent the more than 2,000 members of the Prince George’s County Police Department,” Stawinski said after apologizing to Verdier. Downey now will be subject to an internal investigation to determine his status within the department.

Downey is scheduled for sentencing in October.