An electrical extension cord in the basement may have been overloaded, which generates heat, said state Fire Marshal Stephen D. Coan. The cord was covered by a “large pile of material,’’ which trapped the heat and eventually started the fire, he said.

Smith said in a telephone interview that his department, which sometimes checks homes for elder abuse or neglect, had visited the home four times since 2007. “I was personally there in January of 2011 and found the house in a condition I didn’t consider acceptable for someone to live in,’’ Smith said.

Water service had been turned off, and the house was packed with “an unusually large amount of storage,’’ Smith said.

“I didn’t notice any structural damage to the house, but I did notice major cosmetic things,’’ Smith said. “Parts of the ceiling had fallen, finish work had fallen, and there was an accumulation of life’s miscellaneous stuff around the house that most people get rid of.’’

Kozlowski’s body was found inside the first-floor rear door, officials said. The accumulation of materials made moving through the house difficult during previous visits, so the department notified a social service agency, in accordance with department policy, Smith said.

“We have procedures here that when a firefighter considers any interaction with the public might be elder abuse or neglect, we always notify a social service agency,’’ he said. “The social service agency is walking a fine line between personal liberty and public interest in people like this. They determine whether the person is competent; if they are, they can live any way they want.

“Very sad,’’ Smith said. “In addition to [the condition of the house], it seemed as though he alienated himself from neighbors, town authorities in general, and his family.’’

The blaze was first reported by a neighbor who saw smoke coming from Kozlowski’s home.

Coan said in a statement that conditions inside the home yesterday posed a danger to occupants and firefighters alike.

“The home was extremely cluttered, making an emergency escape from the home nearly impossible and making it extremely difficult for firefighters to gain entry, to conduct search and rescue, and to put out the fire,’’ Coan said. “Hoarding is a serious safety issue not only for the occupants of a building, but also for responding firefighters.’’

Smith said the last fatal fire in Wayland happened in 1995.

Coan’s office said “many compulsive hoarders are elders and can be considered elders at risk.’’ Referrals can be made to elder protective services by calling the statewide Elder Abuse Hotline at 800-922-2275.