MOSCOW — Russian opposition leader Alexei Navalny was convicted Wednesday in a retrial of a 2013 fraud case and given a suspended sentence, a ruling that bars him from running for president next year and appears to reflect the Kremlin's reluctance to let President Vladimir Putin's most charismatic foe into the field.

Navalny vowed to keep campaigning while he appeals.

"What we have just seen is a telegram of sorts from the Kremlin, saying that they consider me, my team and people whose views I represent too dangerous to be allowed into the election campaign," he said. "We do not recognize this verdict, it will be overturned, and . . . I have the right to run in the election."

Navalny was the driving force behind massive protests of Putin's rule in 2011-2012 in Moscow, electrifying crowds with chants of "We are the power!" and saying at one point that the protesters were numerous enough to take the Kremlin.

Even after the protests fizzled amid the Kremlin crackdown, Navalny came in a strong second in Moscow's mayoral election in 2013, with 27 percent of the vote.

Shortly before that vote, Navalny was found guilty and sentenced to five years in prison, but was freed the next morning and allowed to run pending appeal. The abrupt about-face was widely seen as the result of lobbying by those in the government who believed that Navalny's participation would help legitimize the incumbent's victory.

The 2013 guilty verdict in the fraud case was overturned by the European Court of Human Rights, which ruled that Russia violated Navalny's right to a fair trial, prompting the Russian Supreme Court to order of a retrial. It sparked speculation that the Kremlin was considering the same tactic in the 2018 presidential race, letting Navalny compete to help revive public interest in the vote and boost turnout without any real threat to Putin.

The president hasn't said yet whether he will seek another six-year term, but he's widely expected to run.

The 70-year old ultranationalist leader Vladimir Zhirinovsky and the 64-year old liberal Yabloko party leader Grigory Yavlinsky, who ran unsuccessfully in the past elections, both have voiced their intention to run, but their involvement would hardly encourage interest in the campaign.

If Navalny is allowed to run, he would be unlikely to unseat Putin, who has remained widely popular with approval ratings topping 80 percent. The Kremlin, however, might have thought that letting Navalny enter the race would be too risky, given his charisma and the plummeting economy.

Maria Lipman, an independent political analyst, said the verdict has proven the government's intention to keep Navalny from running.

"The Kremlin is demonstrating that he does not have a political future," she said.

Navalny, who rose to prominence by blasting official corruption in his blog, has continued to badger senior officials relentlessly by exposing their lavish mansions and other assets.

His critics have charged that he has effectively become a weapon for rival government clans feeding material to him, but Navalny rejected that, arguing he's serving the public interest and doesn't care about Kremlin infighting.

During a hearing in Kirov, a city nearly 500 miles east of Moscow, Judge Alexei Vtyurin found Navalny guilty of embezzling 16 million rubles ($270,000 at the current exchange rate) from a timber company and gave him a five-year suspended sentence. Including the suspended sentence he has served since 2013, it leaves a year and a half left to serve.

Navalny dismissed the new verdict as a mere "copy and paste" of the previous one, a "cynical trampling" of the European Court's ruling.

The German Foreign Ministry voiced concern about the verdict, pointing at the European court's ruling that the previous verdict was politically motivated, and to doubts about whether the right to a fair trial had been upheld in the new proceedings. It added that Navalny must "have the opportunity to take part in political life in Russia."

The verdict keeps Navalny from competing in the presidential election because of a legal provision barring anyone convicted of grave crimes from seeking public office. He countered by citing the Russian constitution, which says that anyone not serving a prison sentence can run for office.

"I will continue to represent the interests of those who want to see Russia as a normal, honest and corruption-free country," Navalny said.