Already shrinking before the Ukraine war, the space for dissent and freedom of expression has all but vanished in Russia.

The latest sign came on Friday with the wrongful conviction of Wall Street Journal reporter Evan Gershkovich of spying following a hurried closed-door trial that the U.S. government has condemned as a sham. Gershkovich, who was afforded few of the protections normally accorded to defendants in Western countries, was sentenced to 16 years in a high-security penal colony , adding to the number of imprisoned Americans that Russian President Vladimir Putin could exchange in return for high-value Russians held in the West.

Russian authorities have produced no public evidence to support their allegations, which Gershkovich, the Journal and the U.S. government have vehemently and repeatedly denied. The 32-year-old journalist was accredited as a foreign correspondent by Russia’s foreign ministry.

The death and imprisonment of Kremlin critics , the adoption of new repressive legislation, the muzzling of journalists and a tightening noose on the internet has fostered a climate of fear and self-censorship in Russia. Authorities have targeted ordinary citizens, with many facing fines and lengthy imprisonment for merely voicing opposition to the war or challenging the official narrative.

Taken together, the measures have effectively stifled dissent and eliminated the last vestiges of opposition to the regime, human rights watchers and political analysts say. That has helped Putin further tighten his grip over the country’s political, economic and social system.

“Russia now is not even the Russia of the early invasion,” said Sergey Sanovich , a fellow at Stanford University who focuses on Russian politics. “Repression now is different and new.”

This shift represents a fundamental rewriting of Russia’s social contract, which, before the war, amounted to a transactional agreement where citizens tolerated limits on personal freedoms in exchange for economic stability and upward mobility. This has been replaced by an environment intolerant of any dissent and demanding absolute loyalty to the regime.

Arshak Makichyan , a Russian-Armenian climate and antiwar protester who left the country shortly after the war with Ukraine began, said there were “no freedoms left in Russia.” After the still-murky death of Putin opponent   Alexei Navalny in an Arctic prison camp in February, Makichyan said he doesn’t feel safe, even in his new homeland of Germany.

“Russia is not North Korea yet, but it’s on its way in that direction. The climate has changed drastically,” he said. “They broke the social contract, whatever it was.”

The Kremlin didn’t respond to a request for comment for this article.

After Russia’s post-Soviet experiment with Western-style democracy in the 1990s, Putin’s leadership brought restrictions on personal liberties, the independent media and political participation.

But the Kremlin still allowed some forms of protest, often as a relief valve for dissent, and Russians often gathered in mass demonstrations despite the threat of police detentions. Opposition leaders such as Navalny could participate in some elections, even if those were heavily skewed in favor of the regime. Independent media outlets exposed corruption cases or promoted critical views.

All that changed with the Ukraine invasion.

In quick succession, the government implemented a series of restrictive laws that significantly curtail basic human rights, including freedom of expression and assembly. The crackdown targeted anyone who disseminates information critical of the Kremlin or the war. The LGBT movement was added to a list of extremist and terrorist organizations . Authorities declared hundreds of activists “foreign agents,” including scores who had fled abroad, meaning they face possible prosecution if they return home.

In total, Russia’s parliament has adopted 43 repressive laws since the start of the country’s Ukraine invasion in February 2022, according to human-rights group OVD-Info, which itself has been declared a foreign agent. A law adopted this year allowed the confiscation of property from those convicted of crimes, including dissemination of “fake” information about the army.

For many in Russia, the death of Navalny—blamed by his followers on the Kremlin, which denies it—served as the final blow for political opposition inside the country.

Even before that, however, authorities had turned the screws by jailing opposition figures and forcing closure of nongovernmental organizations. They have escalated persecution of political opposition figures, sentencing Vladimir Kara-Murza to 25 years in prison for criticizing the Kremlin and its war in Ukraine. Prominent opposition politician Ilya Yashin was sentenced to 8½ years in prison after he was charged with spreading false information about Russia’s military campaign, which he denied.

Most opposition leaders are now scattered abroad, including Navalny’s widow, Yulia Navalnaya , who promised to continue her husband’s crusade . Earlier this month, a Russian court issued an arrest warrant for Navalnaya for participating in an “extremist” group.

The list of legitimate opposition candidates in last March’s presidential election was slimmer than usual, while establishment figures whom Putin once tolerated as a useful way to keep potential rivals in check have also been sidelined. Yevgeny Prigozhin , the leader of the Wagner mercenary group who launched a short-lived mutiny against Russia’s military command last year, was killed when a bomb destroyed the private jet he was flying in.

The crackdown has extended to ordinary Russians as well, sometimes in bizarre circumstances. A man was fined last year for wearing blue and yellow sneakers, the colors of the Ukrainian flag. A pastry chef was fined for writing antiwar slogans on cakes.

Only a few people, meanwhile, have access to independent information on the war.

Russia has blocked social-media platforms such as X, Instagram and Facebook , as well as foreign media, such as the U.K.’s BBC. Television journalism has been neutered, with news broadcasts mostly peddling government propaganda.

In 2023, authorities say they blocked or deleted 670,000 websites and pages with information prohibited by law. That is up from 247,000 links the year before.

The government has also blocked various VPN services that would allow people to access international websites. Some tech-savvy users with friends abroad have tried to set up a private VPN server, though these are rare exceptions.

“Restrictions online are much more effective than they used to be. It is genuinely technically difficult to access blocked content,” Sanovich of Stanford University said. “The difference from two years ago could not be more stark.”

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