MOSCOW -- A Moscow court has sent Russian opposition leader Alexei Navalny to jail for 20 days for calling for an unsanctioned protest, which would keep him away from a major rally this weekend.

Police detained Navalny on Friday, preventing him from traveling to a rally in a major Russian city that had given its official permission to hold the gathering. Charges brought against the Kremlin's top rival relate to the upcoming rally in St. Petersburg, Russia's second-largest city and President Vladimir Putin's hometown, which has not been sanctioned.

Navalny, 41, is Russia's most outspoken critic of the Russian President Vladimir Putin's regime and arguably the country's most popular opposition politician. He is campaigning to challenge Putin in Russia's presidential election in 2018, although he is officially barred from the ballot.

After Navalny announced his presidential bid last year, he inspired a grassroots campaign in Russian regions to support his nomination.

Get Breaking News Delivered to Your Inbox

"20 days in jail. Old man Putin got so scared of our rallies in the regions and decided to make himself a little present for himself for his birthday," Navalny tweeted shortly after the ruling Monday evening.

The rally in St. Petersburg was scheduled for Saturday, which is also Putin's birthday.

Navalny's campaign late Monday called for rallies to protest his arrest in other Russian cities this Saturday.

A Russian law on public gatherings, which was hastily adopted following massive anti-government rallies in 2011-2012, carries 30 days in jail for repeated violations.

In another Moscow courthouse, a judge is expected to hand down a ruling later Monday in the case of Navalny's campaign chief, Leonid Volkov, who faces similar charges.

The Kremlin has dismissed Navalny, who has faced repeated jailings and criminal cases, as an urbanite out of touch with people living in Russia's 11 time zones where Putin draws his support from. Yet that began to change earlier this year when Navalny opened campaign offices in 80 cities and towns. Most of those places had not seen a diverse political life for decades, and Navalny attracted thousands of supporters.

Navalny spent 25 days in jail earlier this year after thousands of young people took to the streets in cities across Russia in June, with protesters marching through Moscow carrying signs that read "Navalny 2018" and chanting "Putin is a crook." More than 1,000 people were arrested.

Navalny, a lawyer by training, has been convicted three times over the past five years as his anti-corruption campaign has attracted the wrath of the Kremlin.

Navalny said in an interview for "CBSN: On Assignment" that he believes there's a 50 percent chance he will end up dead for speaking out against Putin. Some of Putin's most vocal critics have ended up dead or in exile, although there is no direct evidence tying Putin to a series of mysterious deaths.