Russian opposition leader Alexei Navalny talks to the media after appeals judges in the city of Kirov, where Navalny was convicted in July, suspended his five-year sentence but didn't overturn his conviction. Under Russian law, Navalny goes free but is unable to run for office until 2018. (MAXIM SHEMETOV/REUTERS)

Russian opposition leader Alexei Navalny, who made an unexpectedly strong showing in the Moscow mayoral election last month while his appeal of an embezzlement conviction was pending, won’t be going to prison, a court ruled Wednesday.

Appeals judges in the city of Kirov, where Navalny was convicted in July, suspended his five-year sentence but did not overturn the conviction.

Under Russian law, Navalny goes free, but he is unable to run for office until mid-2018 — missing that year’s presidential election.

Navalny, who has called the conviction politically motivated, said Wednesday that he would pursue further appeals to have it overturned. He also vowed, while speaking to reporters covering the case, to remain active in politics.

“Neither my colleagues nor I will stop our political struggle. It will go on,” Navalny said, in remarks relayed by the Interfax news agency.

In September, Navalny won an officially reported 27 percent of the vote in Moscow’s mayoral election, nearly forcing the incumbent and ultimate winner, Sergei Sobyanin, into a runoff. Given Navalny’s lack of access to the major television channels and Sobyanin’s deployment of government resources on behalf of his campaign, the result was widely seen as a boost to Navalny’s standing and a shock to Sobyanin’s allies in the Kremlin.

Navalny had also had just two months to put a campaign together after his protracted trial in Kirov. He and a co-defendant, Pyotr Ofitserov, were convicted of embezzling about $500,000 in a timber deal they arranged when Navalny was working as an aide to the regional governor. Ofitserov was given four years, but the court also suspended his sentence Wednesday.

Navalny and his allies said the charges against him were trumped up at the Kremlin’s behest and are baseless.

The case, which had been put on hold, was reopened after Navalny became a star of the protests against Russian President Vladimir Putin and the ruling United Russia party in 2011 and 2012.

The day of the conviction, he and Ofitserov were taken into custody. But they were released the next day — a surprise to many — at the prosecution’s request. Prosecutors at the time said Navalny had a right to pursue his electoral campaign before going to prison.

Analysts contend that Sobyanin wanted Navalny in the race to make the incumbent’s eventual win look legitimate, and they speculate that the Kremlin ordered prosecutors to seek Navalny’s release. But Navalny did well enough in the election that Sobyanin’s standing appeared to take a blow.

Now, the authorities may be calculating that throwing the popular opposition leader back into prison would be a more provocative step than they are willing to take.