Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A disabled veteran in Florida who said he shot two homeless men in order to protect a pregnant woman will not be charged because he acted in self-defense, authorities said Wednesday.

Joshua Anderson stepped in during a fight between the men Tuesday night at a beach pier in Port St. Lucie, located along Florida's Atlantic coast. During the altercation, one of the men, later identified as Brett Jowers, allegedly pushed the pregnant girlfriend of the second man, Zachery Sly, to the ground, NBC affiliate WPTV reported.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Anderson, 29, "saw a woman being attacked at night, and he went to her aid," Martin County Sheriff William Snyder said at a news conference. "In my opinion, I think he did the right thing."

Anderson warned the men to back off, but when they threatened to jump on him, he shot each of them in the torso, Snyder added. "You don't have an obligation to allow yourself to be attacked," the sheriff said.

Anderson, who had been out fishing before the attack, called 911. Snyder said the Army veteran has a disability, but did not specify what it is.

Both Jowers and Sly remained in a hospital in critical condition Wednesday. While Anderson isn't expected to face any charges, the other two men could be charged in the incident, WPTV reported.

SOCIAL

Shooter will not be charged, according to @MartinFLSheriff, saying this was a "justifiable use of force." — Katie Johnson (@Katie_Johnson_) March 18, 2015

Disabled vet coming to aid of woman being assaulted, not facing charges in double shooting, due to Stand Your Ground. pic.twitter.com/mGl0n0mQM8 — MartinCountySheriff (@MartinFLSheriff) March 18, 2015

— Erik Ortiz