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.

A man who was rescued by a friend from the waters off the coast of Rancho Palos Verdes Sunday later died at a local hospital, officials said.

A swimmer was airlifted from the Rancho Palos Verdes coastline on July 9, 2017. (Credit: Lomita Sheriff’s Station)

Emergency services crews were sent to the coastline near Hawthorne Boulevard and Calle Entradero after receiving a swimmer in distress call about 11:50 a.m., according to a Los Angeles County Sheriff’s Department news release.

The swimmer, identified only as a man in his 20s, had been pulled from the water by his friend after a possible diving accident, Lt. Del Pinto said.

The man was receiving CPR from citizens at the scene when officials arrived.

Deputies and Los Angeles County Firefighters took over and continued performing CPR until the swimmer was airlifted from the rocky coastline and taken to a local hospital.

Despite about 40 minutes of CPR from citizens and rescue crews, the man was pronounced dead.

Lifeguards across L.A. County were involved in hundreds of rescues as Southern Californians tried to stay cool amid an ongoing heatwave.

Swimmers were warned to be aware of the changing surf conditions, including dangerous rip currents.

Swimmers caught in a rip current should swim parallel to the coastline and swim back to land at an angle, according to the U.S. National Oceanic and Atmospheric Administration.