MOSCOW — In the political fallout from a mall fire in Siberia that killed 64 people, 41 of them children, a longtime regional governor resigned on Sunday.

Aman Tuleyev, who had been governor of the Siberian region of Kemerovo for 20 years, was under intense pressure from local residents who blamed the deadliness of the March 25 fire on political corruption and incompetence.

Thousands of Kemerovo residents rallied to demand answers and resignations from local authorities.

President Vladimir Putin, who flew to Kemerovo on Tuesday to meet with Tuleyev and other officials, said at the time it was premature to talk about resignations. Although governors in Russia are elected by their constituents, the Kremlin has the ability to fire and appoint temporary replacements.

In a video message addressed to the people of Kemerovo posted on the local administration’s website Sunday, Tuleyev said that he had taken it upon himself to vacate his post.

“I believe this is the only right and thoughtful decision for me,” Tuleyev said, “because one can’t work as a governor with such a heavy moral burden; it’s just not right.”

Tuleyev avoided the demonstrators outside a regional administrative building last week. Instead, Kemerovo Mayor Ilya Seredyuk and Tuleyev’s deputy, Sergei Tsivilev, faced the crowds, while Tuleyev met with Putin inside.

According to local media reports, the governor begged Putin’s forgiveness and told his superior that the people in the streets were not genuine mourners or outraged citizens, but opportunistic opposition activists.

The 73-year-old Tuleyev was slated for replacement by the Kremlin before the mall fire, according to local media.

But because the Kremlin is typically loath to be seen as bending to political pressure from demonstrators, it was widely assumed that the governor’s position was at least temporarily secure. So Tuleyev’s resignation on Sunday came as something of a surprise.

According to Andrei Kolesnikov, a Russian political analyst with the Carnegie Moscow Center, the Kremlin had few good options, and the way in which Tuleyev resigned was carefully calculated.

“The Kremlin did everything it could to give the impression that Tuleyev made this decision himself,” Kolesnikov said, “because Putin never makes decisions under pressure from Russian society. Nevertheless, this was inevitable; it was one of the ways they could calm the situation.”

The position is scheduled to be filled by election on Sept. 9. The Kremlin has named Tuleyev’s deputy, Tsivilev, temporary governor of the region.

“I am taking over the region at a very difficult moment,” Tsivilev was quoted by Interfax as saying. “I want to say to you, the residents of Kemerovo and the entire region, that I will do everything to ensure that those guilty in this terrible tragedy are brought the strictest punishment.”

Tsivilev’s handling of the Winter Cherry mall fire has also been criticized within Russia. When facing demonstrators on Tuesday, he was seen accusing a man who lost his family to the fire of using the event for public relations. Later, he knelt on one knee before the crowd and asked for their forgiveness.