California officials rescued a man Wednesday who tried to break into a Chinese restaurant via a grease vent but became stuck there for two days.

A concerned citizen in San Lorenzo in the San Francisco Bay Area called authorities around 9:30 a.m. on Wednesday morning after hearing “a faint voice calling for help” from an empty former Chinese restaurant, said Sgt. Ray Kelly, a spokesperson for the Alameda County Sheriff’s Office.

First responders at the scene heard the voice and determined it was coming from a metal grease duct connecting the kitchen to the roof.

After scaling a ladder, they found a 29-year-old man trapped in the vent, unable to move, and covered in oil and grease.

A photo shared by authorities shows the man’s shoe having fallen down into the kitchen’s interior.

Alameda County Sheriff’s Office

It took firefighters almost an hour to rescue the man, who was said to be physically exhausted and dehydrated.

“It is likely he would not have survived another day given the circumstances,” Kelly said.

The man, who was taken to a hospital for treatment, is now being investigated by police.

“At this time, we are conducting a trespassing and vandalism investigation. It is unknown if the suspect intended to commit a burglary,” Kelly said. “The case will be submitted to the district attorney.”

David Mack is a deputy director of breaking news for BuzzFeed News and is based in New York.