STUART, Fla. (AP) — Florida sheriff's deputies killed a man who opened fire on them early Wednesday as they treated a gunshot victim, officials said. The victim also died.

Martin County Sheriff William Snyder told reporters that a caller reported hearing several gunshots at about 3:30 a.m. Wednesday.

When three deputies arrived, they found a wounded man in front of a home and began treating him. As they did, a shooter came out of the garage and opened fire on them, according to the sheriff. They returned fire, killing the man, Snyder said.

“None of us ever want to shoot anybody. But this was a clear case of self defense,” he said. “It was return gunfire or be shot.”

The original victim and the suspect both died at the scene. A dog was found shot dead inside the house.

Snyder said investigators have not determined the cause of the shooting or the relationship between the two men. The names of the shooter, the victim and the deputies were not released.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.