RESCUE EFFORT: Firefighters and sheriff officers at the chimney where the suspected burglar got stuck.

A suspected burglar who attempted to enter a California home through the chimney, died on Saturday after the homeowner lit a fire without realising an intruder was inside, police said.

The man appeared to have climbed into the chimney during the night while the owner was away and then became stuck, according to the Fresno County Sheriff's Office.

The owner of the home lit a fire in his fireplace on Saturday. He heard a man yelling inside the chimney as the house filled with smoke, the sheriff's office said.

The homeowner tried to extinguish the flames, Reuters reported.

But firefighters who dismantled the chimney during a rescue effort found the suspect dead, the sheriff's office said.

He was identified as 19-year-old Cody Caldwell.

The cause of death was determined to be smoke inhalation and burns.

Mr Jake Jensen, the Fresno County Sheriff's Deputy, told local TV station CBS affiliate KGPE that the homeowner thought Caldwell got into the chimney the night before.

"Don't have any idea how long he had been in there, the homeowner noticed some of his stuff had been rummaged through," he said.

"I've been a deputy for 17 years now and I've never seen anything like this."