What’s confusing, however, is exactly what the Kremlin has to fear.

Allowing Mr. Navalny to compete in March might help Mr. Putin solve one of his biggest problems: how to turn an election that promises to be little more than a tedious coronation into a contest with a frisson of excitement. A low turnout is something the Kremlin desperately wants to avoid.

Opinion polls conducted by the independent Levada Center show Mr. Putin’s approval rating at around 80 percent and indicate that he would crush Mr. Navalny in a race. A Levada poll in early December found that 66 percent of respondents who said they planned to vote would choose Mr. Putin, with only 2 percent favoring Mr. Navalny. That is far below the 27 percent of the vote that Mr. Navalny received when he ran for mayor of Moscow in 2013.

Mr. Putin’s old friend and handpicked prime minister, Dmitri A. Medvedev, recently dismissed Mr. Navalny, without mentioning his name, as a “rogue” trusted by nobody. But the state media apparatus has still gone to great lengths to airbrush him out of Russia’s otherwise somnolent political landscape, seemingly reluctant even to utter his name.

But Mr. Putin, having watched last year’s presidential election in the United States, appears to worry that polls cannot be trusted and that a long-shot rival could, if not win, at least perform much better than expected.

“Once someone is on the ballot, even someone who is considered a sure loser, the outcome is no longer under control,” said William Taubman, professor emeritus at Amherst College and author of a new biography of Mikhail S. Gorbachev. “Witness Trump’s unexpected success, to which Putin was more than an interested observer, but, apparently, a contributor.”

Both President Trump and Mr. Putin, Mr. Taubman said, “want not only to be winners, but big winners. In Putin’s case, even if Navalny can’t win, if the effect of his running were to reduce Putin’s margin of victory as compared to past elections, that would be — or would seem to Putin — as humiliating.”

Having excluded Mr. Navalny from the ballot, the Kremlin worries that he could still cause Mr. Putin headaches by urging voters to stay at home. That might undercut efforts to gin up enthusiasm for an election that was meant to showcase public excitement at the prospect of Mr. Putin becoming the longest-serving leader in the Kremlin since Stalin.