It was grease frightening.

Firefighters rescued a man who had gotten stuck in a grease duct of a California restaurant Wednesday.

The 29-year-old man likely would "not have survived another day given the circumstances," the Alameda County Sheriff's Department said in a statement, but did not specify how long he had been there.

He was covered in grease and oil and couldn't move, the statement said.

A 29-year-old man was rescued from a grease duct of a California restaurant on Dec. 13, 2018. Alameda County Sheriff's Office

The oil-slicked man was found after a resident heard a "faint voice" coming from a vacant Chinese food restaurant in San Lorenzo and called authorities, police said. Responders found the man wedged in a sheet metal grease duct that ran from the roof to the kitchen.

The man couldn't move, and it took firefighters an hour to free him, according to the sheriff's department. He was "physically exhausted and suffering from dehydration" and taken to the hospital, the department said. He's expected to make a full recovery.

The Alameda Sheriff's Department has opened a trespassing and vandalism investigation and is looking into whether the man, who has not been identified, was trying to commit a burglary.