MOSCOW — In a challenge to President Vladimir Putin on his 65th birthday, protesters rallied across Russia on Saturday, heeding opposition leader Alexei Navalny’s call to pressure authorities into letting him enter the presidential race.

Police allowed demonstrators in Moscow to rally near the Kremlin in an apparent desire to avoid marring Putin’s birthday with a crackdown. A bigger rally in St. Petersburg, Putin’s hometown, was disbanded by police after protesters blocked traffic and attempted to break through police cordons.

The rallies came as Navalny himself is serving a 20-day jail term for calling for an earlier unsanctioned protest.

In Moscow, several hundred protesters, most of them students, gathered on downtown Pushkinskaya Square, waving Russian flags and chanting “Russia will be free!” and “Let Navalny run!” Police warned them that the rally wasn’t sanctioned and urged them to disperse, but let the protest continue for hours without trying to break it up.

Mostly teenage protesters later walked down Moscow’s Tverskaya Street toward the Kremlin, shouting “Putin, go away!” and “Future without Putin!” After police lines blocked them from approaching Red Square, they turned back. Several hours later, some made a new attempt to march on the Kremlin, shouting “Putin thief!” and briefly attempted to block traffic.

“We battle for Russia to be free from Putinism. Because the power we have now is feudal, we have no freedom of speech, no freedom of choice,” said protester Stepan Fesov.

The authorities’ decision to refrain from breaking up the protest contrasted with a more forceful response to previous Moscow rallies called by Navalny, when police detained more than 1,000 demonstrators.

Police also didn’t intervene at first with a bigger unsanctioned rally in St. Petersburg, where nearly 2,000 gathered at Marsovo Pole park and then marched across the city chanting “Russia without Putin!” and “Putin, retire!”

Shortly after, police broke up the demonstration, detaining nearly 40 after some tried to break through police lines. Police said those detained were released and will face fines for blocking traffic. One detainee, Marina Bukina, said she was injured in the head when a police officer hit her with a club.

After the St. Petersburg march was disbanded, several hundred protesters continued rallying for hours at the downtown Vosstaniya Square as police stood by without intervening.

“Putin has been in charge since I was born,” said Dmitry Samokhin, an 18-year-old protester in St. Petersburg. “The country is mired in stagnation and I want to see changes.”

Navalny’s headquarters called for protests in 80 cities. Most were not sanctioned by authorities, but police largely refrained from dispersing the rallies that drew from a few dozen to a few hundred people.

Navalny has declared his intention to run for president in the March 2018 election, even though a criminal conviction that he calls politically motivated bars him from running.

Putin hasn’t yet announced whether he would seek re-election, but he’s widely expected to run.

Irina Titova reported from St. Petersburg. Ahmad Katib in Moscow also contributed.