An 18-year-old Clearwater man was shot during an attack on two women at a Tarpon Springs apartment complex early Saturday, officials said.

Pinellas County Sheriff's deputies said Daniel Morley attacked a 52-year-old woman and her 31-year-old neighbor. The younger woman shot Morley when he refused to stop beating the older woman then lunged at her.

The attack occurred in the presence of the younger woman's 3-year-old child.

Deputies responded to an apartment at 1344 Pine Ridge Circle East in Tarpon Springs shortly before 4:00 a.m. Saturday. They were checking out a report of a suspicious person yelling and knocking on doors.

When they arrived, the deputies saw a man who was later identified as Morley standing on the second story balcony wearing only boxer shorts.

Deputies said Morley fit the description of the suspicious person knocking on doors. After seeing deputies, the man ran to the third floor and entered an apartment.

Deputies heard yelling and banging in the apartment before the man opened the door and began to attack the deputies.

They used an electronic control device to subdue him then took him into custody.

None of the victims knew Morley. Deputies said Morley seemed impaired at the time of the incident.

Morley was taken to Bayonet Point Hospital for treatment of the gunshot wound to the leg.

Both victims were treated at the scene for minor injuries. Two deputies also were treated for minor injuries at the scene.

Morley was charged with two counts of simple battery, two counts of burglary with assault or battery, one count of battery of law enforcement officer, and three counts of resisting with violence. He will booked into the Pinellas County Jail when released from the hospital.