MOSCOW — A fire in a psychiatric hospital outside Moscow killed at least 36 people, most of whom were patients confined in the building because of their mental ailments, Russian news agencies reported early Friday.

The building that went up in flames housed Psychiatric Hospital No. 14 in the town of Ramensky near Moscow. Interfax, a news agency, reported it was a “special regime” hospital, meaning that patients were not free to leave.

It is unclear whether this was a factor in the high death toll, as it has been in past fires in psychiatric institutions in Russia.

Though patients are typically confined behind barred windows, Russia’s overall lax culture of fire safety means few plans are made for emergency exits.