A Brevard County deputy was shot several times and wounded Tuesday evening during a confrontation in a residential neighborhood in Indialantic.

An argument over feral cats in the neighborhood escalated into gunfire about 8:30 p.m. at a residence on Avenida De La Vista, where an unidentified man fired on the deputy before being shot and killed in return, according to Sheriff Wayne Ivey.

Ivey said he expects the deputy, who was in surgery at a local hospital early Wednesday, to recover from his wounds.

Deputies received calls about a disturbance between neighbors arguing over feeding feral cats in the area, Ivey said.

One of the residents then became severely agitated when approached by the deputy and went behind a vehicle and charged a rifle, a sound the deputy, a military veteran, was able to recognize.

More:State investigates Brevard Sheriff's charity for ignoring fundraising ban

When he came around the vehicle, he fired at the deputy and the two exchanged several rounds of gunfire. The deputy fired off all rounds in his magazine, reloaded and fired several more shots, according to Ivey.

The subject was pronounced dead at the scene, and the the deputy was in stable condition. Neither the deputy nor the deceased subject have been identified by the Sheriff's Office.

When visited by Ivey at the hospital, the deputy told him simply, "I won."

Neighbors and residents were gathered outside near crime scene vans and deputies along the roadway. Blue flashing lights could be seen flashing in the beachside residential area.

More:No arrest in Walmart shooting: Can you carry a gun in a business in Florida?

More:Shooting leaves man dead at Merritt Island Walmart; Investigators say it was over a relationship

"This started out as as disturbance," Ivey said. "We tell our community all the time that sometimes going out on disturbances is one of the most dangerous parts of our team's job."

Ivey issued a warning to anyone who might threaten an officer with a gun that they would end up in one of three places: the hospital, the morgue or in jail.

The shooting remains under investigation by the Sheriff's Office and the deputy will be on paid administrative leave pending the outcome of the investigation in accordance with department policy.

Tuesday night's shooting marks the first time a Brevard County deputy has been seriously wounded in a shooting since the August 2015 shooting of Agent John "Casey" Smith. Smith was conducting a prostitution investigation in Port St. John when he was shot multiple times by a homeowner.

No deputy has been shot and killed in the line of duty since Barbara Pill, 52, who was conducting a traffic stop when a suspect opened fire and killed her in March 2012.

No further details about Tuesday night's shooting were immediately available.