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.
"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.
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.