A teenage boy has been shot and killed by police after a juvenile hearing at an Ohio court during an altercation, local officials said.

Joseph Haynes, 16, was appearing for a hearing about a firearms charge against him at the Franklin County court in Columbus on Wednesday when a deputy sheriff struck him with a bullet in a hallway.

The teenager was rushed to a nearby hospital, where he was pronounced dead.

“At some point as the hearing was concluding there was an altercation that ensued involving the deputy and some of the family members,” Franklin County Sheriff’s Chief Deputy Rick Minerd told reporters.

Jennifer Brisco, Haynes’ lawyer, said the scuffles broke out when the officer threatened to arrest her client.

“Joseph was a little out of sorts because of how things went at the hearing,” Brisco told The Columbus Dispatch, a local newspaper.

“The officer threatened to lock him up and a scuffle broke out,” she added. “Joseph was resisting, and that’s when there was a scuffle.”

The deputy, who has not been identified for security reasons, suffered a black eye, bruises and abrasions after he was knocked to the ground, Minerd said.

The boy’s grandmother acknowledged that her grandson grabbed the deputy’s shoulder, but told the newspaper that the deputy should have used a taser instead of a gun.

“There was no reason why that cop would have been terrified of Joey,” Geraldine Hayes said.

Meanwhile, Keith Ferrell, executive vice president of the Fraternal Order of Police lodge that represents Franklin County deputies, defended the officer, saying “he had no choice.”

“This was a fight for (the deputy’s) life at some point,” Ferrell told reporters on Thursday.