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: California Drought: Water Crisis ‘Couldn’t Be Worse’ On Oregon-California Border

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: Newsom Budget Targets Cleaning Up California; 'The State’s Too Damn Dirty'

“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: University of California Drops SAT, ACT Test Scores From Admission Requirements

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