Russia’s main opposition leader Alexei Navalny has been held guilty of embezzlement and handed a five-year suspended sentence on Wednesday that bars him from running for President in 2018 against Vladimir Putin, the media reported.

The Kremlin critic denied the charges and said he will appeal against the verdict, the BBC reported. Navalny also vowed to take part in the presidential race regardless.

His conviction came in a retrial after the European Court of Human Rights ruled the first trial to be unfair.

Reacting to the sentence, Navalny said: “We don’t recognise this ruling. I have every right to take part in the election according to the Constitution and I will do so.”

He also said the sentence in the case, which he claimed is politically motivated, was a sign that the Kremlin considered him to be too dangerous. In addition to the suspended sentence, he and a co-defendant were both handed a 500,000 rouble ($8,500) fine.

Navalny, 40, is known for his anti-corruption campaign, which targeted senior officials close to the Kremlin. He said the case against him is an effort to keep him out of politics.

He had recently stepped up his political activity after announcing plans in 2016 to run for the presidency in 2018. Putin is allowed by the Constitution to run for a second consecutive six-year term, but he has not said yet if he plans to do so.

Navalny’s rise as a force in Russian politics began in 2008 when he started blogging about alleged malpractice and corruption at some of Russia’s big state-controlled corporations.

He described the President’s United Russia as “the party of crooks and thieves”, a phrase that stuck among many in Russia. He stood for Moscow mayor in 2013 and got more than a quarter of the vote.

In the first trial, in 2013, Navalny was held guilty of heading a group that embezzled timber worth 16 million roubles ($500,000) from the Kirovles state timber company while working as an adviser to Kirov’s Governor Nikita Belykh.

He was then given a five-year suspended sentence. The verdict was widely condemned by the European Union and the US, with opposition supporters clashing with the police in Moscow, St. Petersburg and other cities.

The verdict was overturned by the Russian Supreme Court last year following a judgment by the European Court of Human Rights (ECHR) that said he was not given a fair hearing at the first trial.

The ECHR also said the original trial had failed to address allegations that it was politically motivated.

And last week, the ECHR ordered Russia to pay him more than 63,000 euros ($6,7400) in compensation, saying his right to peaceful protest had been violated multiple times, in cases dating back to 2012.