MOSCOW — Russian opposition leader Alexei Navalny was ordered to spend the next 32 months in prison Tuesday, as he defiantly denounced President Vladimir Putin and said his supporters will not be intimidated by widening Kremlin crackdowns.

Hours after the verdict, protesters heeded Navalny's call. Several thousand people marched through central Moscow and St. Petersburg, chanting "Russia without Putin" and "Freedom." Riot police detained hundreds of people and beat some in the crowd with batons, according to video posted on social media.

Navalny again accused Putin of ordering the nerve agent attack that nearly killed him in August and rejected the case against him — alleged probation violations — as political retribution less than three weeks after he returned to Russia.

Navalny, in court in a glass-enclosed pen, thanked the tens of thousands of supporters who have taken to the streets to call for his freedom in recent weeks. In another swipe at authorities, he also paid tribute to members of his team targeted by authorities in arrest sweeps of opposition activists.

As his wife, Yulia, cried during the verdict — two years and approximately eight months in a penal colony — he drew a heart for her on the glass wall of his court cage.

She waited in the front row of the courtroom seating area until he was released from the cell, ripping off her black face mask and lifting an arm to wave to him as police led him off in handcuffs.

“Bye. Don’t be sad,” he yelled to her. “Everything is going to be all right.”

In an emotional address to the court, Navalny said Putin would be remembered in history as “Vladimir the poisoner.”

“I’m guarded here by the police. Half of Moscow is blocked off because we proved that he issued orders to steal underwear from his opponent and smear it with chemical weapons,” Navalny said, referring to the poisoning attack in the Siberian city of Tomsk.

He said the “show trial” was a scare tactic that would not work.

“This is not a demonstration of strength,” he told the court. “It is a demonstration of weakness.”

To stem planned protests in the aftermath of Navalny’s conviction, four metro stations were closed in central Moscow as scores of riot police began detaining people, local media reported. Pushkin Square, also in the city center, was cordoned off with metal barricades.

More than 1,000 people were detained Tuesday, according to rights group OVD-Info. It followed the detention of more than 5,000 Sunday and more than 4,000 the previous weekend — both ominous single-day records since the organization began counting arrests in 2011.

“The current situation is a pivotal moment for Putin’s regime,” Tatiana Stanovaya, the head of the R. Politik think tank, said on Twitter. “For the first time in 20 years, it faces a completely new situation. This is the first time the Kremlin is unable to channel public discontent in a controllable direction.”

Russian opposition leader Alexei Navalny’s team released a two-hour video investigation on Jan. 19 that looks at what they call “Putin’s palace.” (The Washington Post)

Speaking to the court earlier, Navalny demanded his freedom, saying that Russia was trying to jail him over a 2014 case in which the European Court of Human Rights had already cleared him.

“Someone did not want me to take a single step on the territory of Russia as a free man,” he said, referring to his return to Russia on Jan. 17 from Germany, where he recovered from the poisoning.

He called on Russians not to be afraid because “they can’t arrest the entire country.”

In what sounded like a campaign speech, Navalny referenced the “20 million people living below the poverty line” in Russia and “tens of millions living without the slightest prospects for the future” while “the only thing growing is the number of billionaires.”

Both the judge and the prosecutor attempted to silence him, imploring him to discuss just this case. Navalny talked over them, insisting it was all related, and continued his remarks, which lasted more than 16 minutes.

He vowed to continue his fight, “despite the fact that I am under the control of people who like to smear everything with chemical weapons, and no one will give three kopecks for my life.”

Moments after the verdict, a statement by Secretary of State Antony Blinken said the “United States is deeply concerned by Russia’s actions toward” Navalny.

“We reiterate our call for his immediate and unconditional release as well as the release of all those wrongfully detained for exercising their rights,” the statement added.

British foreign secretary Dominic Raab also called for Navalny to be freed along with “all of the peaceful protesters and journalists arrested over the last two weeks.”

At least 10 diplomats observed the hearing.

Navalny’s lawyers said they would appeal the verdict and complain to the Council of Europe.

The Kremlin has dismissed the alarm among U.S. and European leaders over the August poisoning with a nerve agent similar to the Soviet-era Novichok. Russia refused to open a criminal case, and it has suggested that if Navalny was indeed poisoned, it could have happened in Germany.

Navalny said the penal service was “deceiving everybody” in its claims he failed to meet his probation obligations, stating he was in a coma after his poisoning and then was being treated in Germany. He said he sent documents to the penal service informing it of his whereabouts.

At one point, he questioned the Federal Penitentiary Service official himself, smirking as he asked him: “Comrade captain, do you respect President Vladimir Vladimirovich Putin?”

“Putin said on live television that thanks to him, I’d been sent to Germany for treatment, so how did you not know where I was?”

Because Navalny previously spent roughly 10 months under house arrest connected to this case, that counts as time served toward the court’s three-year, six-month sentence — as does Navalny’s past two weeks in a Moscow pretrial detention center.

At times during the hearing, Navalny glanced over to his wife and smiled. When the court dismissed for a two-hour lunch break, he jokingly asked whether someone could bring him McDonald’s takeout.

Outside the court, hundreds of Navalny’s supporters crowded the sidewalks.

“What’s happening to Alexei now is beyond all limits,” said Eduard Mikhalevich, 37, a social worker who never participated in any protest until Jan. 23, when he joined tens of thousands of protesting Russians in more than 100 cities calling for Navalny’s freedom.

The Kremlin has said that the crackdown was appropriate and that the protests were led by “hooligans and provocateurs.”

But a new protest generation — largely young people, many of whom have never protested before — appears to have shaken the government.

Navalny has been exposing government corruption for more than a decade, but his latest effort, a viral video “Putin’s Palace: History of the World’s Largest Bribe,” which has garnered more than 106 million views on YouTube, appears to have struck a nerve with the Kremlin. Its allegation that a vast palace was built for Putin on the Black Sea undercuts the president’s image as a conservative traditionalist with the nation’s interests at heart.

Arkady Rotenberg, an oligarch under U.S. sanctions as a member of Putin’s inner circle, says that he has owned the palace for two years and that it will become a hotel.

Navalny’s national network of 40 regional headquarters and his ability to communicate directly with Russians through his popular YouTube channel make him a potent threat. His decision to fly home to Russia after being poisoned, knowing that he faced a likely jail term, has captured the imaginations of many young Russians and drawn an outpouring of support from celebrities, actors, writers, sports figures and bloggers.

Now Navalny is scheduled for release in October 2023, less than six months before Russia will have its next presidential election.