A 63-year-old man died hours after a fire at his Logan Square neighborhood apartment building Friday morning on the Northwest Side.

Crews responded just before 5 a.m. to the blaze on the third floor of the building in the 3100 block of North Milwaukee, according to the Chicago Fire Dept.

Ted P. Duda was taken to Stroger Hospital, where he died at 6:53 p.m., according to the Cook County medical examiner’s office. An autopsy on Saturday found he died of asphyxiation from smoke inhalation and thermal injuries. His death was ruled an accident.

The fire was extinguished within 20 minutes, and it left five other adults in the building homeless, fire officials said.

The cause is under investigation.