 Lifeguards are warning beachgoers of dangerous rip currents after two swimmers drowned and a third died from a heart attack after being rescued in Panama City Beach.

Police said more than 25 people were rescued from the surf Saturday. Many swimmers ignored beach flags warning the water was closed. City officials united to warn beachgoers to stay out of the water.

Police Chief Drew Whitman said six beach police trucks, three county trucks, a helicopter and several officers were on foot assisting in the effort.

Authorities said 49-year-old Charles Smith and 25 -year-old Fredrick Tillman, of Jackson, Miss. drowned.

The News Herald reports a third swimmer had been out of the water for about 10 minutes when he died from a heart attack. Authorities did not release his name.