Ministry for Emergency Situations workers and fire fighters work at the site of a fire at a psychiatric hospital Friday morning.

MOSCOW — A fire raged through a wood-and-brick psychiatric hospital outside Moscow early Friday, killing 38 people, mostly patients who died in their beds as firefighters made the hourlong journey from the nearest station, safety officials said.

A nurse tried to extinguish the fire and evacuate patients, but it spread so quickly through the 73-year-old structure that she was able to lead only one patient to safety before the building was consumed, Yuri Deshovykh, director of the Russian Emergency Situations Ministry’s oversight department, told the Interfax news agency. Of the 41 people in the building, only three survived.

Fires in Russian nursing homes and medical facilities have repeatedly resulted in dozens of deaths, in some cases because their patients were locked in.

However, investigators said the patients in Psychiatric Hospital No. 14, in the village of Ramensky, were not locked in and could have left the building if they had woken up.

More than two-thirds of the patients regularly took powerful antipsychotic medications before going to bed, Veronika Skvortsova, Russia’s health minister, told reporters. Most died of burns or carbon monoxide poisoning.

“All victims were found in their beds,” Deshovykh said. “There was no one in the corridor. Even the dead bodies of two nurses were found in their recreation room.”

A stream of officials visited the site of the fire, which President Vladimir Putin called an “awful tragedy which took many lives.” Putin ordered his subordinates to begin sweeping checks of medical facilities, calling the fire “yet another reminder that safety must be taken seriously.”

Russia’s overall lax culture of fire safety means that few plans are made for emergency exits, and Deshovykh said the most recent fire safety inspection, conducted in January 2012, found several violations, including bare bulbs in lamps and poor conditions in a pond of water used for extinguishing fires. Firefighters traveled from a station 30 miles away, but it took them an hour — three times the response time allowed by the state — in part because a nearby canal was swollen from spring flooding, and they were forced to make a large circle to cross it.

Irina Gumennaya, a spokeswoman for the Russian Investigative Committee, the main federal investigating authority in Russia, said the fire started on a sofa, and investigators suspect that it was started by a recovering addict who smoked surreptitiously to alleviate withdrawal symptoms. She said one of the survivors “woke after smelling smoke, then heard some scratching sounds and ran out of the burning building.”

“That is why we believe that careless handling of fire, including as a result of smoking, was the most likely cause of the blaze,” Gumennaya said. Among the 38 people who died in the fire, 11 had no known friends or relatives, making identification difficult, Skvortsova said.

Fires are a plague in Russia, which has high rates of alcoholism and smoking, dilapidated firefighting equipment, aging electrical and heating systems, and widespread violations of safety codes. From 2006 to 2008, Russia’s rate of death from fire was more than 8 per 100,000, compared with about 1 per 100,000 in Greece, Denmark, the United States and the United Kingdom, according to a report by the Geneva Association, which analyzes international fire statistics.

Vladimir P. Lukin, Russia’s human rights commissioner, said Friday that rights activists had put forward scores of proposals for establishing oversight mechanisms for psychiatric facilities, but that they had typically foundered in “the notorious bureaucratic circle.”

“Of course, criminal liability for what has happened can only be a result of a thorough and objective investigation of this drama,” he told Interfax. “However, the feeling remains that the Ramensky tragedy is in line with the context of an overall civic disease: indifference to all human problems but your own.”