A pre-dawn fire swept through a Russian psychiatric hospital Friday, killing 37 people, officials said. Authorities had long warned that the mostly wooden building dating to the 19th century was unsafe.

It was the second such deadly blaze in less than five months, underlining the widespread neglect of fire safety standards in Russia.

The fire in the one-story hospital in the village of Luka, about 280 miles northwest of Moscow, erupted about 3 a.m. and quickly engulfed the structure, the Emergency Situations Ministry said.

The ministry said rescuers so far have recovered 26 bodies. The Investigative Committee did not explain how it confirmed the other deaths.

The agency added that the blaze was apparently inadvertently sparked by a patient, but the hospital’s chief doctor insisted the fire was a deliberate arson.

State Rossiya 24 television reported that a witness said a smoking patient caused the fire. It said a nurse tried to put out the flames with a blanket but they spread quickly. The 44-year-old nurse, who was married and had four children, died in the fire while trying to rescue the patients, it reported.

The man who started the fire was saved, Rossiya 24 reported. However, Husein Magomedov, the hospital’s chief doctor, denied the fire was caused by a smoking patient and said that the patient deliberately set the fire and died in the blaze.

Firefighters arrived at the scene within minutes, but found the building already swept up in flames. “Fire spread through the building in a moment,” Boris Borzov, the top firefighting official, said in televised remarks.

Russian television stations showed the smoldering ruins of the hospital with rescuers combing through debris in a search for bodies.

Emergency officials said 23 of the 60 people in the building when the blaze broke out were evacuated. Emergency teams combed a nearby forest for patients who may have fled the blaze or wandered off, but officials said from the start they had little hope of finding any survivors.

Emergency officials had demanded the facility be closed after it failed a fire safety check earlier this year. The hospital administration, however, won permission to continue using it until next year.

The head of Russia’s top state investigation agency, Yekaterina Gilina, flew to the area to personally oversee a probe. Gilina said on Rossiya 24 the probe will look into whether hospital officials had fulfilled a court order to fix the flaws in the building.

Russia has a poor fire safety record with about 12,000 fire deaths reported in 2012. By comparison, the U.S., with a population roughly double Russia’s, recorded around 3,000 fire deaths in 2011.

A fire at a psychiatric hospital near Moscow killed 38 people in April.