MOSCOW — Prosecutors in President Vladimir V. Putin’s government ordered an immediate halt on Monday to all public activity by Aleksei A. Navalny’s political groups, in one of the more sweeping legal moves against the Russian opposition in recent years.

Previously, prosecutors had targeted Mr. Navalny and other opposition figures mostly on pretexts, such as accusations they had violated rules for public gatherings, laws unrelated to politics or more recently restrictions on public meetings because of the coronavirus.

The order issued on Monday differed from those precedents in that it directly targeted the opposition group for what are usually seen as political activities.

It was the latest move in a long cat-and-mouse battle between Mr. Putin and Mr. Navalny. The opposition leader has led an anti-corruption drive that has frustrated and embarrassed the Russian leader for years, despite unrelenting pressure from the Russian authorities.