Chinese Foreign Ministry spokesman Lu Kang takes a question from the media during a press conference. (Nicolas Asfouri/AFP/Getty Images)

China’s President Xi Jinping is in a pinch.

For months now, the Communist Party has been whipping up nationalist sentiment, casting the Philippines’ South China Sea case as an illegal and humiliating foreign plot.

On Tuesday, the Permanent Court of Arbitration in The Hague delivered what was widely seen as stunning rebuke, finding “no legal basis” for the country’s expansive maritime claims.

Now China’s leader is left with a delicate choice. Does he double down on strident nationalism at the risk of stoking the conflict, or does he find a way, somehow, to take a step back?

The Permanent Court of Arbitration in The Hague ruled that China does not have historic rights to justify its expansive claims. The verdict, which strongly favored the Philippines, will undermine China's claim to sovereignty under the nine-dash line it draws around most of the sea. (Simon Denyer,Jason Aldag/The Washington Post / Satellite photos courtesy of CSIS)

“As far as international opinion is concerned, China has effectively isolated itself,” said Andrew Mertha, a Cornell University specialist in Chinese politics.

“Domestically, Beijing has painted itself into a corner and may find itself compelled to act in a potentially reckless fashion, if only to demonstrate to its domestic audience that it is not, to use a Cold War term, an ‘empty cannon’ in the eyes of its own citizens.”

On Wednesday morning in Beijing, the firepower was mostly rhetorical. The front pages of Chinese newspapers repeated the government’s solemn pledge not to recognize, accept or execute any part of the ruling, while the Communist Party mouthpiece, the People’s Daily, vowed the nation would take “all necessary measures to protect its territorial sovereignty and maritime rights and interests.”

China sent two civilian aircraft to two new airports on reefs it controls in the South China Sea, Mischief Reef and Subi Reef, according to Xinhua, a party-controlled news agency. The planes reportedly returned to Hainan, an island off China’s southern coast, later in the day.

In Beijing, the Ministry of Foreign Affairs held a 90-minute news conference to release a 13,000-word policy paper on the South China Sea. At the event, broadcast twice — in full — on state television, Deputy Foreign Minister Liu Zhenmin said the decision should be thrown away and even accused the five-member panel of jurists of taking money from the Philippines and “possibly other people.”

Liu pushed again for bilateral talks with the Philippines under its newly elected president, Rodrigo Duterte — provided, of course, that no one mentions what the tribunal just decided.

“After the storm of this arbitration has passed, and the sky has cleared, we hope this day will come,” he said, referring to the possibility of talks. “Whether it can come, we still have to wait.”

Liu also reiterated China’s willingness to engage in joint development of the vast resources in and under the waters of the South China Sea, and he said his country could offer the Philippines “tangible benefits.”

“I think, be it cooperation in fishing or oil and gas resources, China can reach agreements with neighboring countries in the South China Sea,” he said.

In Manila, the ruling was met with a mix of jubilation and calls for calm.

Wednesday morning’s papers showed crowds of people dressed in the red, blue, white and yellow of the Philippine flag, celebrating with banners and balloons. “Court junks China claims,” one headline said. Another front page read, “It’s Ours.”

The official response, though, has been strikingly muted. The foreign minister immediately called for “restraint and sobriety.” The vice president issued a three-paragraph statement saying she was “glad” and urged “respect for the ruling."

The Philippines clearly plans to tread carefully. During his presidential campaign, Duterte spooked some observers by, for instance, promising to ride a water scooter to the Scarborough Shoal, a Chinese-held chain of reefs and rocks near the Philippines, to plant his country’s flag.

He has since softened his rhetoric, suggesting that he is open to talks with China at some point and signaling a desire to forge closer economic relations. His challenge will be to balance his desire to reset Sino-Philippine ties without looking like a sellout at home or jeopardizing ties with the United States.

Reaching an agreement on the joint development of resources will not be easy because international law has delineated a vast arc of ocean as the exclusive economic zone of the Philippines, but China has reiterated what it deems its “indisputable” rights to much of those waters.

One sliver of hope is that the tribunal, while negating China’s “historic rights” to the disputed sea, backed the idea that the waters around Scarborough Shoal are the traditional fishing grounds of both nations.

“That could offer a basis for negotiation on joint management of fisheries,” said Yanmei Xie, senior China analyst for the International Crisis Group.

The big surprise came from Taiwan, whose new president, Tsai Ing-wen, addressed sailors aboard a naval vessel before it set sail into the South China Sea.

The frigate was set on Thursday to visit Taiping Island, a disputed feature administered by Taiwan, but was sent off a day early, according to reports in the Taiwanese news media.

On Tuesday, the tribunal ruled Taiping is merely a “rock,” not an island, and is therefore not entitled to a 200-mile exclusive economic zone. Taipei rejected the ruling.

“The South China arbitration ruling, especially in the part about Taiping Island, has seriously hurt our rights to the South China Sea islands and their relevant waters,” Tsai said. “This naval mission is to demonstrate the resolution of Taiwanese people in defending our national interests.”

But most eyes are on Beijing’s reaction and, specifically, how Xi will decide to push things forward.

China is playing host to a summit of leaders of the Group of 20 major economies in September, and it is unlikely to take any dramatic steps until then, many experts predict. Further ahead, Xi has a number of options on the table to extend his nation’s de facto control of the waters of the South China Sea, including building a new artificial island and military base on Scarborough Shoal and deploying fighter jets to other newly constructed islands.

Ultimately, China could even declare an air defense identification zone over the entire region — under which incoming aircraft would be asked to declare themselves to Chinese authorities. Liu, the deputy foreign minister, said Wednesday that China has the right to take such a step “if our security is being threatened” but said that would depend on its overall assessment.

“We hope that other countries will not take this opportunity to threaten China, and work with China to protect the peace and stability of the South China Sea, and not let it become the origin of a war,” he said.

But Mira Rapp-Hooper, a senior fellow with the Asia-Pacific Security Program at the Center for a New American Security, said Beijing would be unwise to take any steps that would close the door to bilateral talks, in which it would have significant bargaining power.

“The Philippines would now be negotiating from a position of substantial legal strength, but is still a much smaller power,” she said. “Manila, like all others involved, has no ability to enforce” the court’s ruling “and clearly feels it stands to gain from an improved economic relationship with China.”

Jerome Cohen, an expert in Chinese law at New York University School of Law, wrote that the tribunal’s decision has had the “healthy effect” of reducing the importance of the reefs and rocks in the South China Sea by denying them exclusive economic zones, “which will eventually make it easier to deal with these issues.”

But he also said the tribunal’s decision had rebounded badly on China’s leader, who he thinks faces significant internal dissent.

“I think this ruling will add significantly to Xi Jinping’s internal problems,” he wrote. “It was a disastrous call to thumb China’s nose at United Nations Convention on the Law of the Sea (UNCLOS) even while claiming to respect it, and the outcome gives many dissatisfied members of Beijing’s elite more fuel for the fire they are lighting under him.”

Gu Jinglu and Xu Yangjingjing contributed to this report.