Moscow (CNN) -- Alexei Navalny has said all along that a court would convict him. Not because he's guilty, but because it would prevent him from running for mayor of Moscow.
On Thursday, a Russian court did just that to Navalny, one of Russian President Vladimir Putin's most outspoken critics.
The court, in the city of Kirov, ruled that Navalny was guilty of misappropriating about $500,000 worth of lumber from a state-owned company. He was sentenced to five years in prison.
The activist has called the trial politically motivated.
Navalny has often accused government officials of dipping into the earnings of state-run companies.
Will Navalny conviction hurt opposition?
Pussy Riot husband describes Navalny
Khodorkovsky: Courts used to oppress "These people steal billions," he alleged in a CNN interview in April. "I'm making it harder for them to steal."
He said his conviction is retaliation for taking to task the Kremlin, specifically over corruption.
Russian authorities insist that's not the case.
But others disagree.
Protest leaders arrested at Moscow rally
The trial was a sham, the European Union's top diplomat said after Navalny's sentencing.
"This outcome, given the procedural shortcomings, raises serious questions as to the state of the rule of law in Russia," EU foreign affairs chief Catherine Ashton said.
Former Soviet leader Mikhail Gorbachev said the case had "left a very serious impression," in a statement published in Russian on the Gorbachev Foundation website.
"Everything I know about this case -- how it started, how it was closed, and then opened again, how it was considered in court -- unfortunately confirms that we do not have an independent judiciary," he said.
"I am convinced that using the judiciary to fight political opponents is not acceptable. Since Navalny's lawyers are filing an appeal, I believe the final full stop has not yet been put on this case."
UK Foreign Secretary William Hague also voiced his concern about Navalny's conviction. "The decision to sentence him for five years has highlighted once again the concerns felt by many about the selective application of the rule of law in Russia," he said.
Three months ago, Navalny's voice boomed out over a microphone from a Moscow stage in front of tens of thousands of people, as he blasted Russia's most powerful man as the foe of democracy.
It was one of many street protests challenging the Kremlin that have burgeoned in recent years. Navalny is one of their most prominent organizers.
Last year, the Kremlin took action. It passed new laws to curb demonstrations.
Then Navalny was arrested and charged.
He immediately believed he would not get off the hook.
"They didn't fabricate the case to allow that," he told CNN at the time.
The real penalty
Navalny now faces a five-year prison term, a year less than the prosecutor asked for.
But a jail cell is not the main punishment, he said in April. And he had anticipated that someday, he would do time for his activism.
If his conviction stands, Navalny will, by law, not be able to run for public office. It's not an uncommon law. Convicted felons in the United States, for example, are also prohibited from doing so.
But Navalny hopes through his protests to one day overturn that law, which he calls part of "Putin's system."
Rachel Denber, deputy director of Human Rights Watch's Europe and Central Asia division, said that while the guilty verdict came as no surprise -- as "the culmination of a criminal prosecution brought for political reasons with a preordained conclusion" -- the sentence was still shocking.
It can only be seen through a political lens, as part of a broader government crackdown to silence a fierce critic and the opposition movement, she said in an online statement.
"Russia's new laws are aimed at putting public life in Russia under greater government control, and Navalny's prosecution is meant to silence a leader and messenger," she said.
Rights group Amnesty International added its voice to the chorus of condemnation.
The charges against Navalny were "highly questionable," and "the way his guilt was supposedly proven raises serious doubts," said John Dalhuisen, the organization's Europe and Central Asia program director.
"This was a parody of a prosecution and a parody of a trial. The case was twice closed for lack of evidence of a crime, before being reopened on the personal instruction of Russia's top investigator," he said.