 -- A Russian court has given the country's most prominent opposition leader a five-year suspended prison sentence for embezzlement, in what critics say is a political trial intended to prevent him from running against President Vladimir Putin in elections next year.

Alexei Navalny, 40, who made his name as an anti-corruption blogger chronicling the alleged ill-gotten gains of top officials, has become one of the leading figures in Russia's beleaguered anti-Putin opposition. In December he declared his intention to run against Putin in the country's 2018 presidential election, saying that although he had no chance of winning, it would be good for the country.

But on Wednesday, a court in the provincial city of Kirov found Navalny and his co-defendant, Pyotr Ofitserov, guilty of embezzling about $500,000 from local timber company Kirovles and gave them suspended sentences of five years and four years, respectively. The conviction means Navalny may be barred from running in the presidential election.

They both deny the charges, which they say are politically motivated.

It is the second time Navalny has been sentenced in what is known as the Kirovles case, which was ordered retried by Russia's Supreme Court in November after the European Court of Human Rights found he had not been given a fair trial.

In Wednesday's hearing, Judge Alexei Vtyurin found both men guilty and ordered them to pay fines of about $8,400 each in addition to their suspended sentences.

Speaking after the hearing, Navalny promised he would appeal the verdict and campaign for president, regardless.

"Right now I am participating in the election campaign," he told reporters. "And what we see right now, it's a kind of telegram that's come from the Kremlin — that they consider me, my team and those people whose views I represent as too dangerous to participate in the election campaign."

Navalny's run is an avowed protest campaign against Russia's Kremlin-controlled politics, with no chance of defeating Putin, whose popularity remains high and whose control over the vote will, in any case, be almost total. But the possibility of Navalny's highlighting Russia's democratic deficiencies appears to have concerned authorities enough to have them seemingly move to head it off.

The trial is the latest in a series of cases brought against Navalny since he rose to prominence in street protests five years ago. He has come to be viewed as the Kremlin's most significant political opponent.

In 2013 he led an unprecedented campaign to become Moscow's mayor, gaining 27 percent of the vote despite being virtually shut out from Russian television and labeled a Western agent by pro-Kremlin media. Since then, the Kremlin has sought to contain him but has moved cautiously, mindful of sparking fresh demonstrations. In his first Kirovles trial in Kirov in 2013, he was sentenced to five years in prison, but that sentence was suspended after thousands of people took to the streets in Moscow to protest.

In 2014 he was given a 3 1/2-year suspended sentence in a separate case involving the French company Yves Rocher. Authorities have imprisoned his brother, who is not involved in politics, allegedly to persuade the activist to drop his opposition work, Navalny has claimed. Before Wednesday's verdict, his supporters said they were sure he would be found guilty.

"You're bringing good news, I hope," he told the judge as he entered the courtroom before the sentencing on Wednesday. The judge, laughing, said Navalny would find out.

Charismatic, with a talent for media performance, Navalny has responded to the campaign against him by effectively trolling it, tweeting irreverently throughout the court hearing. Drawing attention to what he said was the similarity of Wednesday's verdict to the first, now discredited one, he wrote on Twitter, "It's boring."

His modern campaigns are something new for Russia, relying on social media and thousands of enthusiastic young volunteers. His advisers liked to say his Moscow mayoral run was modeled on Barack Obama's 2008 presidential campaign. Recently, Navalny's group, the Fund for Combating Corruption, has taken to flying drones with cameras over the vast mansions belonging to the Kremlin's inner circle — worth far more than their published salaries should allow.

Whether Wednesday's sentence definitively blocks Navalny's presidential candidacy is unclear. Few expect his appeal will produce a different result, but his campaign manager, Leonid Volkov, said that the law was unclear on whether a convicted person may run, saying Russia's constitution permits it, even though election laws expressly forbid it. Volkov promised the campaign will continue as planned. Recently, Navalny has increasingly refused to obey the restrictions placed on him by the courts, daring the Kremlin to punish him. He was forcibly taken to Kirov from Moscow after he twice refused to attend the hearing.

This case against him comes against a backdrop of mounting pressure for the Kremlin's opponents in Russia. Another well-known opposition organizer, Vladimir Kara-Murza, is in critical condition in a Moscow hospital after being poisoned by an unknown substance for the second time in two years. Boris Nemtsov, a top opposition figure, was shot dead in front of the Kremlin in 2015. Other opposition leaders have been threatened or had embarrassing videos of them leaked.

Speaking with ABC News this week, Evgenia Kara-Murza, Vladimir Kara-Murza's wife, said Putin opponents believe they have to keep working, despite the risks.

"Only by keeping silent, by running away, people lose," she said. Referring to her husband, she added, "When they stay, when they fight, no matter what — as Boris Nemtsov did, like he does himself, like so many of his colleagues do — only in this we can achieve something."