A fire swept through a Russian psychiatric hospital overnight, killing at least three people and leaving at least 37 dead, officials said Friday. Authorities had long warned that the building was unsafe and called for its closure.

The fire in the one-story hospital in the village of Luka in the northwestern Novgorod region erupted at around 3 a.m. local time Friday and quickly engulfed the mostly wooden structure dating back to the 19th century, the Emergency Situations Ministry said.

Emergency had demanded the facility be closed, but the hospital administration won permission to use it until next year.

Officials said the blaze was likely sparked by a smoking patient, and state Rossiya 24 television reported that a witness account confirmed that. It said that the man who triggered the fire was saved.

The Investigative Committee said Friday that rescuers so far have recovered 10 bodies. It did not explain how it knew about the other deaths. The agency added that the blaze was apparently sparked by a patient.

Russia has a poor fire safety record, with about 12,000 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 similar fire at a psychiatric hospital near Moscow killed 38 people in April.