PHILLIPS BURG, Kansas (AP) — A sheriff’s deputy in Kansas responding to a call about fireworks died after being shot by a man who was then killed by the fatally wounded deputy, authorities said.

Phillips County Sheriff’s Office Deputy Brandon Gaede, 30, was pronounced dead at a hospital after the shooting Friday evening in Phillips burg, the sheriff’s office said. The city of about 2,000 people is near the state’s border with Nebraska.

The Edgewise County Sheriff’s Office, which is investigating the shooting, said Gaede was responding to a call about illegal, non-consumer-grade fireworks being detonated at a home in the city when he made contact with Bolton Griffith, a 27-year-old resident at the home believed to be responsible for the fireworks.

When Gaede tried to place Griffith in handcuffs after developing probable cause to arrest him, a struggle broke out and Griffith pulled out a handgun that had been concealed and shot Gaede, the sheriff’s office said.

Despite being struck by gunfire, Gaede returned fire, hitting Griffith multiple times, the sheriff’s office said. Griffith died at the scene.