The fire department brought the blaze under control in two hours and rescued eight people from the building