A man accompanied by one or two dogs at Ocean Beach died Thursday after trying to rescue one of the dogs from the surf, though it's not clear whether rough waters had anything to do with his injuries.

A man was seen running fully clothed into the water at Ocean Beach near Lawton Street Thursday afternoon around 2 pm. According to the San Francisco Fire Department, "911 Callers reported a fully clothed adult male entered the surf line to rescue a dog and, for an unknown reason, collapsed."

Two women who were on the beach, who called 911, reportedly rescued the man from the surfline, pulling him to shore, and emergency responders performed life-saving measures when they arrived, but the man succumbed to his injuries.

The dog that the man was trying to rescue reportedly made it out of the water and was uninjured.

As KTVU reports, a video from a witness showed two dogs unleashed and wandering around the scene while the man was receiving CPR from first responders.

The victim has not been publicly identified.

The SFFD advises people to stay out of the water at Ocean Beach because of the potential for rip currents and sneaker waves, especially at times of high surf.

"Call 911, don’t go in the water after a dog, don’t go in the water after a person, call 911," says Sukai Curtis-Contreras, a spokesperson for the San Francisco Fire Department.

Photo by Casey Horner