MOSCOW — A day after the largest antigovernment protests in more than five years, a Moscow court on Monday slapped the opposition leader behind the outburst, Aleksei A. Navalny, with a 15-day prison sentence for resisting arrest.

At the urging of Mr. Navalny, tens of thousands of Russians — many of them in their teens and 20s — poured into the streets in scores of cities across the country on Sunday to protest endemic corruption among the governing elite, despite a blanket ban against unsanctioned rallies of any size.

The police responded by beating protesters and arresting more than 1,000 in Moscow alone, though by Monday many had been released.

As Mr. Navalny was led into the courtroom for a hearing that lasted much of the day, he told reporters that he was “amazed by the number of cities that took part in this and by how many people came out.” After the judge ordered him jailed, Mr. Navalny was whisked away without being allowed a chance to comment further.