SAN FRANCISCO (CBS SF) — A woman walking down an alley in San Francisco’s Mission District Tuesday morning discovered a man on fire, raced to a nearby cafe for a bucket of water and then helped put out the flames, authorities said.

Police and firefighters responded around 10:30 a.m. to the area of Osage and 24th streets near the 24th Street BART station after receiving a call of a man on fire.

READ MORE: Scott Peterson Resentenced To Life Without Parole; Laci's Mom: 'You Will Always Be Their Murderer'

San Francisco police Lt. Rachel Murphy said the woman’s quick actions were heroic and helped save the man’s life.

“It was absolutely heroic,” she said. “A witness (the woman) came down the alley and saw smoke. She saw a man on fire.”

Quick-thinking, the woman raced to a near by cafe to get water and have someone call 911.

READ MORE: As SCOTUS Reconsiders Roe, Group Pushes California To Become Abortion Sanctuary

“She ran back down the alley to a cafe and got a bucket of water,” Murphy said. “(She) asked the cafe to call 911 and ran back and threw water on the person on fire.”

The victim — a man in his 50s — was rushed to the hospital. Murphy said he was in critical condition and undergoing surgery.

There were no indications of a fire in the immediate area around the victim, according to Officer Giselle Linnane. Investigators were looking for witnesses or surveillance video that might help determine how the man got burned.

“It’s unknown if it was self-inflicted, it if is was accidental or if there were suspects involved,” Murphy said.

MORE NEWS: Warriors Steph Curry Closes In On 3-Point Record; ' He Changed The Outlook' Of The Game

Arson investigators were on the scene to assist police with their investigation.