MOSCOW—A Russian court declared the opposition network of jailed Kremlin critic Alexei Navalny as extremist in a move that bans the groups, the Kremlin’s most definitive step yet to eradicate political resistance in the country.

The ruling comes after Russian President Vladimir Putin earlier this month signed a law that prevents anyone belonging to an extremist organization from running for office, essentially sidelining Mr. Navalny’s nationwide movement from challenging the ruling United Russia party in September’s parliamentary elections.

The decision raises the stakes ahead of next week’s summit between Mr. Putin and President Biden in Geneva where the U.S. president is expected to raise human-rights issues. Mr. Putin has previously dismissed Western criticism of Russia’s handling of Mr. Navalny’s case and has tried to portray international support for Mr. Navalny as proof that he and his supporters are agents of the West, bent on destabilizing Russia.

A mural labeling Alexei Navalny ‘the hero of new times’ was painted over earlier this year in St. Petersburg.

A mural labeling Alexei Navalny ‘the hero of new times’ was painted over earlier this year in St. Petersburg.

Photo: Alexander Demianchuk/TASS/Zuma Press

With Mr. Navalny serving a 2½-year prison sentence for violating parole conditions on charges he says are trumped up, political observers see Mr. Putin’s using the opportunity to neutralize his movement and also strike a blow against the personal legacy of the Kremlin critic.

After the verdict was announced late Wednesday in Moscow, Mr. Navalny vowed to continue opposing Mr. Putin.

“We will not retreat from our goals and ideas,” Mr. Navalny wrote in an Instagram post. “This is our country and we have no other.”

U.K. Foreign Secretary Dominic Raab condemned the ruling calling it “perverse.”

“It is another Kafka-esque attack on those standing up against corruption and for open societies, and is a deliberate attempt to effectively outlaw genuine political opposition in Russia,” Mr. Raab said in a statement.

Mr. Navalny’s lawyers said they would appeal the decision, which takes effect immediately. It bans the work of Mr. Navalny’s allies and exposes them to criminal prosecution.

The measure would prevent anyone with connections to Mr. Navalny’s organization from competing against the ruling United Russia party and state-approved opposition parties in September’s elections. It could also hurt his group’s efforts to persuade people to vote for the best-placed opposition parties, a strategy Mr. Navalny calls smart voting.

There are other opposition groups in Russia, such as the left-leaning Yabloko party. But only Mr. Navalny’s organization has been able to draw the kind of mass appeal that could alter the course of an election and limit support for United Russia, particularly in local contests, analysts say.

Mr. Navalny’s Anti-Corruption Foundation has heaped pressure on the Kremlin in recent years by publishing investigations into high-level corruption among top-level political figures.

Mr. Navalny, the Kremlin’s most outspoken critic at home, was detained in January after returning from Germany, where he had spent several months recuperating from a poisoning attempt that he says was orchestrated by Mr. Putin’s government. The Kremlin denies the allegation. Mr. Navalny’s jailing led to massive demonstrations across the country.

Even before Wednesday’s verdict, the Kremlin was tightening the screws on Mr. Navalny’s network. Most of his key aides are under house arrest or in exile. Many of his group’s rank-and-file have come under pressure from their employers or their places of study for joining street protests in support of the dissident.

Write to Georgi Kantchev at georgi.kantchev@wsj.com