A man died while swimming at Lopez Lake on Tuesday afternoon, the San Luis Obispo County Sheriff’s Office said.

Santa Maria resident Nathan Martinez, 20, was swimming with his friends when people noticed that “he appeared to be in distress and went underwater,” a news release from the Sheriff’s Office said.

The incident was reported to 9-1-1 at 4:14 p.m., according to the emergency response app PulsePoint.

People flagged down a nearby boat, and the occupants pulled Martinez out of the water.

Bystanders administered CPR, then Martinez was transported to Arroyo Grande Community Hospital. Martinez was pronounced dead at the hospital, the Sheriff’s Office said.

“The Sheriff’s Office extends its sincere condolences to Mr. Martinez’s family and loved ones during this difficult time,” the release said.

Lopez Lake Recreation Area is located about 10 miles east of Arroyo Grande in SLO County.