At least 27 people were killed before the fire brigade brought the flames under control.