A suspected burglar who got stuck in a chimney following a botched home invasion in Central California died Saturday when the homeowner tried to light a fire in his fireplace.

"(The homeowner) had tried to light a fire in his fireplace and heard somebody calling out for help in the chimney," Jake Jensen of the Fresno County Sheriff's Office told YourCentralValley.com.

The suspected burglar was identified as 19-year-old Cody Caldwell, who, investigators believe, climbed inside the chimney sometime Friday night to rob the Huron home but became stuck. He was in the chimney for nearly 24 hours by the time the homeowner, who wasn't there at the time of the robbery, returned home and lit the fire a little before 3 p.m. Saturday.

The homeowner soon heard Caldwell scream for help inside the chimney and tried to put the fire out as the house filled with smoke, according to CBS San Francisco.

Firefighters responded to the scene where they used drills and chisels to dismantle the chimney, but by the time they reached Caldwell, he was already dead, the sheriff's office revealed, noting its unclear if Caldwell had a prior criminal record or if he's linked to other break-in's that the neighborhood has seen recently.

An autopsy determined that Caldwell died from thermal burns and smoke inhalation, according to the Los Angeles Times.

In addition to the dismantled chimney, the home suffered smoke damage.