MOSCOW — The Russian opposition politician Aleksei A. Navalny was convicted and sentenced to 20 days in jail by a Russian court on Monday for repeated violation of rules governing public demonstrations — a term long enough for him to miss a major rally he and supporters had scheduled for Saturday.

Over the past two weeks, Mr. Navalny held several well-attended public events in major Russian cities in what he and his staff are calling a presidential campaign. Russia’s Central Election Commission has said, however, that he cannot legally run for president because of a prior criminal conviction for embezzlement in the theft of timber from a state company, Kirovles.

Over the past year, Mr. Navalny turned into the pre-eminent critic of Russia’s president, Vladimir V. Putin, exposing endemic corruption among top-level government officials in a series of popular videos.

Mr. Putin has not yet officially announced that he will run for another term, but he is widely expected to do so.