HAULOVER BEACH, Fla. -- A man swimming at a south Florida beach was bitten on both legs by a shark.

CBS Miami reports that Lt. Felipe Lay of Miami-Dade Fire Rescue says the unidentified man was swimming Sunday afternoon off Haulover Beach when he was attacked.

"He was up in the north end of Haulover Beach and he was in the water coming off the sandbar when he noticed the lifeguards were trying to get his attention to come in," said Miami-Dade Fire Ocean Rescue Lt. Matthew Sparling. "While he was walking up the sandbar, he went through a little deep water and was struck by the shark."

Miami-Dade Fire Rescue Ocean Rescue lifeguards say they became aware of a shark lurking in the water and immediately began alerting bathers to get out of the water. Officials say the bull shark was 4-to-5 feet.

Officials say 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 say the shark attack is the first reported at Haulover Beach, 9 miles north of Miami Beach.

CBS Miami reports that officials advise beachgoers to always swim near lifeguard stations and to pay attention to warnings even though they say incidents like this one are very rare. One official said it's so rare that he has never known of a shark attack in Miami-Dade in 20 years.