The San Francisco fire captain happened to be the first person to notice the swimmer was in distress near Aquatic Park.
RELATED: Swimmer bitten by sea lion in San Francisco Bay, rescued at Pier 45
The captain began CPR and a police department boat crew joined in the lifesaving efforts.
Within minutes, the rescuers brought the man to shore. His heart re-started and he began to breathe again before being taken to a hospital.