MOSCOW — The opposition politician Aleksei A. Navalny was sentenced to 30 days in jail on Wednesday, his spokesman said, for planning to lead an unauthorized protest demonstration in Moscow.

Kira Yarmysh, a spokeswoman for Mr. Navalny, said the police had detained Mr. Navalny early on Wednesday for calling on protesters to stage an opposition rally this weekend.

“I left home for a jog and to buy my wife flowers for her birthday,” Mr. Navalny, a high-profile critic of the Kremlin, said in a video message on Instagram. “There was a small bus of riot police near my stairwell and I was detained.”

Mr. Navalny’s detention and sentencing came after a protest last Saturday against the exclusion of most opposition-minded candidates from an election for the Moscow legislature in September.