BEIJING — When the Chinese tech company Huawei sued the U.S. government this week to challenge a ban on federal purchases of its products, the news lit up Chinese social media with all the usual reactions.

Young nationalists cheered on the iconic company, a symbol of Chinese tech prowess. Skeptics pooh-poohed Huawei’s chances in court. Armchair analysts offered flinty takes on the U.S.-China battle for global tech supremacy. Still others marveled that the legal case was being waged at all. As in: you can really sue the American government — in America?

Amid a flood of comments about the lawsuit, user Hahaxiyien, turned the tables in a message posted on the Chinese social platform Weibo.

“It will be only be shocking when a company can sue the Chinese government,” he wrote.

In taking its battle to American courts — where it will seek to prove that Congress violated its constitutionally-guaranteed rights — Huawei has inadvertently laid bare some basic differences between two countries with very different political and economic systems. The incompatibilities go to the heart of the current conflict between Washington and Beijing.

The idea that a foreign company can take on the government in its own courts is all but moot in today’s China, where President Xi Jinping has forcefully argued against judicial independence and exhorted the Communist Party to tighten its grip over all aspects of society — lest, he claims, the country slide into instability.

So when Huawei’s chief legal officer Song Liuping argued this week that Congress was behaving like “lawmaker, prosecutor and juror all at once” — he was describing something like Xi’s vision for the Communist Party as the first and last word in the Chinese system.

“We must never follow the path of Western ‘constitutionalism,’ ‘separation of powers,’ or ‘judicial independence,’’’ Xi warned in a speech last year that was flagged by party media as a major piece of political theory that cadres should study.

In the past six years, Chinese authorities undertook a sprawling, nationwide campaign to break up a network of dissident lawyers who used the courts to challenge local authorities on matters like land seizures and police brutality. (They never won.) Hundreds of lawyers were detained and more than a dozen were held in secret locations for years before being tried, sometimes behind closed doors.

Meanwhile, Xi has advocated for training a new generation of lawyers and judges who are “loyal to the Party and the state.” In his 2018 speech, he urged China to learn to wield the law for its advantage, particularly in international arenas.

“In the struggle against foreign powers, we must take up legal weapons, occupy the high ground of the rule of law,” Xi said.

American business groups say all this means they’re at a fundamental disadvantage in China, where not only are there no independent courts where they can seek legal redress in disputes, but many companies, from Visa to Facebook, are locked out of the Chinese market altogether due to long-standing restrictive policies.

“Huawei at least has the right of redress to say, ‘we’ve been unfairly singled out,’” said George Magnus, an associate at the Oxford University’s China Center. “That’s not an option for foreign companies — or companies generally — in China. There’s no rule of law, only the Party’s law.”

For its part, China’s government says it wants to be held accountable and is willing to be challenged, to a degree.

In 2015, China amended a law that would let private citizens sue the government, and state media highlighted the case of a southern Chinese company that sued a local education department that year. Nearly seven decades after the establishment of modern China, it was the first time a Chinese court had agreed to hear such a case, and the first time a plaintiff had ever won against a government agency.

But if the Chinese suing their government is still relatively unheard of, China has cheered the prospect of Huawei defending itself and, somewhat improbably, held up the U.S. court system as a last beacon of hope. On Friday, Foreign Minister Wang Yi said the government applauded Huawei for “seeking legal redress to protect their own interests and refusing to be victimized like silent lambs.”

The Global Times said in an op-ed that if Huawei loses, “the reputation of the U.S. judicial system will be disgraced.”

“The court is the last hope for the truth to be heard, evidence presented and debates witnessed,” the Communist Party-run newspaper said. “It will test the independence of the U.S. judicial system. People will be able to see how the court deals with facts, common sense and U.S. geopolitical interests.”

While Huawei executives and its lawyers streamed a live presentation in Shenzhen this week to announce their lawsuit, the event caught the attention of many Chinese Internet users, including plenty who vented about how the U.S. bullied China and pledged to buy more Huawei phones as a gesture of support.

Others cracked jokes, with many pointing out that a parade of Huawei executives reading remarks off of the new MateX foldable phone made the event seem like a marketing stunt.

One of the most popular takes was by Weibo user who goes by the handle AyaChixuShuchu, who pointed out that the case of Huawei has never been just about the company. “It has always been a battlefield between China and the U.S.,” the user said. “On the global stage, Huawei represents China’s national interests.”

Another user, Yadangsijiatu, was more effusive.

“Huawei just proved America’s great,” he said.