MULBERRY, Fla. — The Polk County Sheriff's Office is investigating after a man shot himself outside of his ex-wife's home when he confronted her with a gun.

Deputies say it happened Thursday morning around 7:30 a.m. near Mulberry Senior High School. As students were arriving, the school resource officer heard what sounded like a gunshot off campus. The deputy alerted the principal to place the school on lockdown before running toward the sound.

He saw a man and woman struggling outside of a home then, he says, the man shot himself in the head.

The man, 48-year-old Julio Serrano Jr. was pronounced dead at the scene. Deputies say Serrano was struggling with his ex-wife outside of her home. She told deputies she was leaving her house to go to work when she was confronted by her ex-husband, who was armed with a .357 Magnum revolver.

The woman told deputies he grabbed her and they struggled. Serrano dropped his gun and she picked it up, firing into the air. She said she was trying to get someone's attention.

Serrano regained control of the gun and shot himself in the head, according to deputies.

"Domestic violence is a horrible crime, and what we have seen twice this week, are the unfortunate extreme results. If you are currently in a really bad or violent relationship, please, learn from this. There is help available," Sheriff Grady Judd said.

The woman had minor injuries from the struggle.