BAKU, Azerbaijan — At least 24 people died in a fire early Friday at a drug rehabilitation clinic in Azerbaijan’s capital, Baku, the authorities said.

The police and prosecutors said in a joint statement that the fire broke out in an old, one-story wooden building around 6 a.m. and burned for three hours. The blaze was attributed to a short circuit.

The Health Ministry said that 200 patients and staff had been evacuated, 34 had been rescued and three had been hospitalized.

The office of President Ilham Aliyev said he had arrived at the scene to oversee the rescue effort and had ordered an investigation into the blaze.