A man swimming off a popular clothing-optional beach in Florida on Sunday was bitten on both legs by a bull shark.

Miami-Dade Fire Rescue Lt. Felipe Lay said the unidentified man was swimming in the afternoon off Haulover Beach when he was attacked, according to WPLG-TV. Haulover Beach is 9 miles north of Miami Beach.

Miami-Dade Fire Fescue Ocean Rescue lifeguards said they became aware of a shark in the water and immediately alerted beachgoers to get out of the water. Officials said the shark was 4-to-5 feet long.

SHARK BITES OF NORTH CAROLINA WOMAN'S ARM

The man, who was able to get out of the water and get aid from lifeguards, was taken to Aventura Hospital with non-life-threatening injuries, officials said.

The American Association for Nude Recreation describes the clothing-optional portion of Haulover Beach beach as "one of the greatest success stories in North American nudism” that "attracts thousands of nudists on warm afternoons."

GREEK ISLAND WHERE AMERICAN KILLED KNOWN FOR DEBAUCHERY, VIOLENCE

Officials said the shark attack is the first reported at Haulover Beach.

The Associated Press contributed to this report.