LinkedIn, the social networking site for professionals that will soon be bought by Microsoft, is to be blocked in Russia on Thursday after a local court ruled it had breached the country’s data protection rules, a sign of growing tensions for American tech companies operating in the country.

The case in the Moscow city courts arose in the middle of debate in Washington over how the United States might retaliate for what American security officials said was the Russian government’s hacking of emails from the Democratic National Committee and other digital interference in the election.

Russia has a history of ratcheting up regulatory pressure on businesses in political disputes. The case began in August, before Donald J. Trump’s victory in Tuesday’s presidential election.

The ban — a rare occasion of LinkedIn being blocked in a country — came after lawmakers passed new rules last year that required any personal digital data on Russian citizens collected by companies to be stored inside the country.

Officials said the rules were aimed at protecting people’s online privacy from hackers, but critics have claimed the legislation could allow Russian authorities to force companies — both local and international — to hand over sensitive information about their users.

Many of Silicon Valley’s largest tech companies, like Facebook and Twitter, also do not store data locally within Russia, but Roskomnadzor, the country’s telecommunications watchdog, targeted LinkedIn for its failure to comply with the new data rules.

It was unclear why LinkedIn was targeted in particular, rather than any other major social networking site.

On Thursday, a Moscow court upheld a previous ruling against the social network, which has fewer than five million Russian users among its 467 million global users. The company will now be blocked from operating across the country, though LinkedIn could still appeal the court’s decision.

The ban could take effect as early as Monday, with internet service providers in Russia blocking access to the company’s web address.

“The Russian court’s decision has the potential to deny access to LinkedIn for the millions of members we have in Russia and the companies that use LinkedIn to grow their businesses,” Anoek Eckhardt, a company spokeswoman, said in a statement. “We remain interested in a meeting with Roskomnadzor to discuss their data localization request.”

The decision against LinkedIn comes at a tense time for the social network, which is being bought by Microsoft — a Silicon Valley tech giant with deep links in Russia — for $26.2 billion.

A number of other American tech companies like Facebook and Twitter have made efforts to expand their footprints within the country, though they have had to balance people’s use of these social networks with the government’s often heavy-handed efforts to gain control of digital information.

Facebook, for instance, rejected all five requests from the Russian government last year for access to specific data on people’s online accounts, according to the company’s latest transparency report. Twitter also rejected four requests from local officials for individuals’ account information over the same period, according to its own report.

Analysts have suggested that the Russian authorities focused on LinkedIn, an also-ran in the country’s social networking market, as a warning to larger tech companies that they must now store people’s digital information within local servers.

Despite LinkedIn’s current problems in Russia, the company has often been willing to bend to local pressures, particularly in China, where it has agreed to abide by the country’s strict censorship rules to build a significant presence there. Other American tech companies like Google and Facebook remain blocked in China.

The current standoff over data in Russia started in 2012, when local campaigners in Moscow used social networks to organize widespread protests against the re-election of the country’s current president, Vladimir V. Putin. The same year, Russian hackers breached LinkedIn and stole more than six million of its customers’ passwords.

Despite criticism of Russia’s data protection rules, other countries, including Germany, have passed similar legislation that forces tech companies to store people’s digital information in local servers. The efforts have been aimed at safeguarding individuals’ personal data, though American tech companies have been quick to voice their skepticism over such practices.

In Russia, companies like Google have also faced other challenges from local incumbents like Yandex, the country’s largest search engine, which have often outmuscled international rivals in their home market.

This year, Yandex won a legal challenge against Google over antitrust claims that the American search giant has unfairly favored some of its own mobile services over those of rivals. Eventually, the Silicon Valley company was fined a mere $6.8 million in the case.