MOSCOW — Cruising toward a certain victory in this Sunday’s presidential election, President Vladimir V. Putin briefly dropped his image as Russia’s tough but merciful czar to make clear that he could forgive misdeeds by wayward subjects, but “not everything.”

Asked what could not be forgiven, Mr. Putin said bluntly, “Betrayal.”

Mr. Putin’s unforgiving contempt for treachery, displayed in a new hagiographic film released this week, provides the emotional and political backdrop to a pattern of Russian behavior that, Prime Minister Theresa May of Britain announced on Monday, made it “highly likely” that Moscow was responsible for a March 4 nerve-agent attack in Salisbury, England, on Sergei V. Skripal and his daughter, Yulia.

Viewed from London, the attack on Mr. Skripal, a former colonel in Russian military intelligence who was recruited as a spy by Britain, was in Mrs. May’s words, an “indiscriminate and reckless act” that “put the lives of innocent civilians at risk,” while sending Russia’s relations with the West into yet another downward spiral.

Britain followed through on those allegations on Wednesday, expelling 23 Russian diplomats and outlining an array of other actions it would take.