This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

SAN DIEGO — A man had to be rescued after getting swept away by waves in Ocean Beach Wednesday, the same day the pier was closed for a high surf advisory.

Lifeguards pulled the man from the water and gave him CPR before he was rushed to UCSD Hillcrest, according to San Diego Fire-Rescue. Officials said around 5 p.m. that the man had a pulse and was breathing with help from a respirator.

The man was a visitor from Nevada believed to be in his mid-50s to early 60s, officials said. He was first seen chasing after his dog as it ran into the water at the dog beach around 1:45 p.m.

The man was swept about 75 yards out and was eventually spotted floating face-down, officials said. Beachgoers rushed into the water to try to help the man, with one bringing the dog safely back to shore.

San Diego lifeguards on jet skis eventually reached the man and brought him in. The tourist was unconscious and not breathing, and lifeguards gave the man CPR before SDFD rushed him to the hospital.

The National Weather Service has issued a high surf advisory that lasts through 10 p.m. Thursday, warning of rip currents and waves ranging up to 14 feet in height. The advisory led officials to close the pier in Ocean Beach.