MOSCOW — A Russian court sentenced Aleksei A. Navalny, Russia’s most prominent opposition leader, to more than two years in prison on Tuesday, a decision likely to send him for a lengthy term in a far-flung penal colony for the first time.
Tuesday’s sentencing represented a pivotal moment for President Vladimir V. Putin’s Russia. Mr. Navalny, one of the main challengers of the Kremlin, has inspired some of the biggest street protests of the Putin era and repeatedly embarrassed the president and his close allies with investigative reports about alleged corruption that were viewed many millions of times on YouTube.
The authorities previously tried to contain him with short jail terms of a few weeks to avoid making Mr. Navalny into a political martyr. In August, Western officials say, Russian agents tried to assassinate Mr. Navalny by poisoning him. Now, the decision to send him to prison removes his direct voice from Russia’s political landscape, but it could energize his supporters and further rally Russian opposition to Mr. Putin around the figure of Mr. Navalny.
Mr. Navalny may seek to appeal the ruling, which held that Mr. Navalny had repeatedly violated parole. But the Russian authorities have signaled that they will not be swayed by public pressure to release Mr. Navalny, a 44-year-old anticorruption activist. They have put several of his top allies under house arrest, and on Sunday they deployed a huge police force in cities across Russia to quell protests over the past couple of weeks calling for his freedom
“Hundreds of thousands cannot be locked up,” Mr. Navalny said during the hearing before he was sentenced. “I really hope that more and more people will recognize this. And when they recognize this — and that moment will come — all of this will fall apart, because you cannot lock up the whole country.”
In anticipation of more protests on Tuesday, a heavy presence of riot police officers in body armor, camouflage and black helmets cordoned off the Moscow neighborhood surrounding the courthouse. Officers stood in front of entrances to the nearest subway station and checked people’s documents, and parking lots around the station were filled with police vans carrying reinforcements. The police detained at least 237 people, according to the activist group OVD-Info.
The court ruled in favor of the prosecution’s accusation that Mr. Navalny had violated parole on a three-and-a-half-year suspended prison sentence that he received in 2014. He and his brother were convicted of stealing about $500,000 from two companies, a conviction that the European Court of Human Rights called “arbitrary and manifestly unreasonable.”
The judge, Natalia Repnikova, accepted the prosecution’s request to convert Mr. Navalny’s suspended sentence to a real prison term. About nine months’ house arrest served by Mr. Navalny related to the case will be subtracted from the sentence, meaning that he was effectively sentenced to just over two-and-a-half years in prison.
Under the terms of his earlier sentence, the authorities say Mr. Navalny was supposed to check in with the prison authorities at least twice a month. But prosecutors charge that he repeatedly failed to do so last year, including after being released from a Berlin hospital in September while recovering from an assassination attempt by poisoning.
“Despite the preventive and explanatory measures taken with Navalny, he repeatedly failed to appear at the inspection for registration for unacceptable reasons,” Ms. Repnikova, said in her ruling, accepting the prosecution’s contention that Mr. Navalny did not fulfill the terms of his parole.
Toward the end of the hearing, Mr. Navalny delivered a fiery speech to the courtroom in which he blamed Mr. Putin for trying to lock him away. He said the Russian president was angry that Mr. Navalny had survived after being poisoned with the military-grade nerve agent Novichok in August, in what he and Western officials have described as a state assassination attempt.
Mr. Navalny has accused Russia’s domestic intelligence agency of trying to kill him on orders from Mr. Putin by applying Novichok to the opposition leader’s underwear. The Kremlin has denied involvement in the poisoning.
“His main resentment against me now is that he will go down in history as a poisoner,” Mr. Navalny said of Mr. Putin. “There was Alexander the Liberator and Yaroslav the Wise. Now we’ll have Vladimir the Poisoner of Underpants.”
Mr. Navalny’s associates have said that only street protests can force the Kremlin to change course, and tens of thousands of people have rallied for Mr. Navalny each of the last two weekends in cities across Russia.
Early in the hearing, Mr. Navalny — confined to a glass box for defendants, as is typical in Russia — smiled often and maintained his sense of humor. When the judge, Ms. Repnikova, asked him to introduce himself, he replied, “Your honor, you forgot to introduce yourself.”
When Ms. Repnikova asked for his current address, he deadpanned: “Pretrial Detention Facility No. 1.”
Mr. Navalny sparred repeatedly with the prosecutor, Yekaterina Frolova, calling her “an honorable daughter of the regime,” but then adding, “You lie in every word.” He said he was being prosecuted to scare millions of other Russians out of rising up against Mr. Putin.
The choreography of the hearing appeared designed to portray due process being granted to Mr. Navalny. Officials moved the hearing from a courtroom outside Moscow to a bigger one in the city — in order, they said, to allow more journalists to be present.
Two sculpted judicial scales flanked the Russian double-headed eagle above the robed judge, Ms. Repnikova, who peppered the prosecution with pointed questions, probing its arguments. Mr. Navalny was allowed to give his speech, and criticize the judge and prosecutor, with few interruptions. But journalists were barred from filming the proceedings or taking pictures.
The prosecution’s case for sending Mr. Navalny to prison relied heavily on technicalities. A prison service official, Aleksandr Yermolin, read in a soft voice from a stack of papers detailing Mr. Navalny’s alleged parole violations. The prosecution said the violations had begun before Mr. Navalny’s poisoning last August.
Mr. Navalny and his lawyers, in a lengthy back-and-forth with the prosecution, insisted that they had properly notified parole officials of his inability to report in person because of his poisoning. Mr. Navalny noted that even Mr. Putin had publicly referred last year to Mr. Navalny’s being in treatment in Germany.
Mr. Navalny was confined to house arrest for much of 2014 and served repeated jail terms of several weeks at a time. Until now, though, he has never served a lengthy prison sentence.
Analysts say the Kremlin’s calculus has long been that Mr. Navalny could be more of a liability behind bars — as Russia’s most prominent political prisoner — than walking free as an often-controversial opposition activist.
That thinking appears to have changed as the Russian public’s frustration with Mr. Putin has increased, along with Mr. Navalny’s prominence.
After his poisoning, Mr. Navalny was airlifted in a coma to Berlin, where he recovered. He returned to Moscow last month, even though the Russian authorities made it clear that he would face years in prison.
He was jailed upon arrival, after which his team released a report by Mr. Navalny that described a purported secret palace built for Mr. Putin. The report has been viewed more than 100 million times on YouTube, energized the pro-Navalny protests and underscored the opposition leader’s ability to reach a huge audience on Russia’s mostly free internet.
The Kremlin on Tuesday again sought to minimize the significance of Mr. Navalny’s case, issuing a veiled warning to the European Union’s top foreign policy official, Josep Borrell Fontelles, who plans to visit Moscow this week.
“We hope that there will not be something as silly as tying the future of Russian-European relations to the case of this pretrial detention center inhabitant,” the Kremlin spokesman Dmitri S. Peskov said, according to the Tass state news agency.
Ivan Nechepurenko contributed reporting.