MOSCOW — The Russian opposition figure Aleksei A. Navalny was sentenced on Tuesday to 30 days in jail for organizing a rally not approved by the government two days before President Vladimir V. Putin’s inauguration for a fourth term.

Mr. Navalny organized protests across Russia on May 5 under the slogan “He is not a czar to us.” Many of the demonstrations were not approved by local governments, and thousands of people took part. Hundreds were arrested, including Mr. Navalny, in Moscow.

The protests posed little threat to Mr. Putin, whose approval ratings hover above 80 percent. But the Kremlin has been increasingly unwilling to tolerate even minor displays of political discontent.

After announcing the verdict in a Moscow court, Judge Dmitri Gordeev returned to his chambers to consider a separate ruling on an accusation that Mr. Navalny had disobeyed police orders as he was detained. Posting to his Twitter account from the courtroom, Mr. Navalny wondered why this required a separate ruling, given that he had already received the maximum punishment.