A homeowner in Huron, Calif., was just settling in for a nice relaxing afternoon in front of a fire over the weekend when he heard someone yelling from inside the chimney leading from his fireplace.

As his house filled with smoke, he attempted to douse the fire. He summoned the fire department, which worked to dismantle the chimney even as the man was still breathing and moving inside.

But it was too late, and the man died of smoke inhalation and thermal burns, according to the Fresno County Sheriff’s office.

According to the sheriff’s office, the man had attempted to burglarize the house using the chimney for access the night before and had gotten stuck inside. The homeowner was gone at the time, so when he returned home, he had no reason to believe anyone was in the chimney and went ahead and started a fire.

On Sunday, the Fresno County Coroner’s Office identified the deceased individual as Cody Caldwell, 19. The homeowner was not named.

It’s been cold in central California, with temperatures dipping into the 30s at night.