Beijing must prepare to make the US “pay a cost it can’t stand” if it intervenes in the South China Sea dispute by force, a state newspaper editorial has warned, days before a court at The Hague rules on the territorial row between China and the Philippines.

The American military build-up in the South China Sea, including the deployment of two carrier strike groups, comes in defiance of China’s vital interests and represents “a direct threat to national security,” the state-run Global Times said in strongly-worded editorials in its Chinese and English editions on Tuesday.

Beijing should accelerate developing its strategic deterrence capabilities to contain the United States, the newspaper added.

“Even though China cannot keep up with the US militarily in the short-term, it should be able to let the US pay a cost it cannot stand if it intervenes in the South China Sea dispute by force.”

China is a peaceful country that welcomes dialogue on the disputed region, the influential newspaper wrote, “but it must be prepared for any military confrontation.”

The Global Times is believed to have close ties with the government as it operates under the auspices of the Communist Party’s official newspaper, the People’s Daily.

The Tuesday editorial went online a week ahead of a ruling by the International Court of Arbitration in The Hague on the South China Sea dispute between China and the Philippines. In 2013, the Philippines filed a complaint with the court, asking it to rule on who owns the Spratly Islands, which lie at the heart of economically important shipping routes in the area.

China sees the ruling – which is due to be announced on July 12 – as “posing more threat to the integrity of China's maritime and territorial sovereignty,” the Global Times stated, claiming “the arbitration becomes nothing but a farce.” Beijing has said it will not recognize the ruling.

What tensions? Chinese ships join US Navy in massive Pacific exercise https://t.co/QEq9j7TwBEpic.twitter.com/2Od3xozzx8 — RT (@RT_com) June 27, 2016

The Spratly Islands, or Spratlys, comprise more than 750 islets, atolls and reefs, and lie off the coastlines of Vietnam, the Philippines, Taiwan, Malaysia, Brunei and China, with all the claimants having their own national names for the archipelago.

China runs military drills near Paracel Islands

Prior to The Hague court’s ruling, Beijing announced it will conduct a routine naval exercise covering an area east of China’s Hainan Island all the way up to and including the Paracel Islands (known as Xisha in Chinese), another disputed area. The drill will run from Tuesday to July 11, and will involve two Chinese guided-missile destroyers, the Shenyang and Ningbo, as well as a frigate, the Chaozhou, according to the People’s Daily.

The exercise has sparked fears across the region, but “could be regarded as a countermeasure” to the US efforts “to press China militarily and politically,” the Global Times’ editorial said.

Over the past few years, Beijing has reclaimed several atolls and built up military installations on the group of disputed islands in the South China Sea. Washington has accused China of “aggressive behavior” in the region, sending warships to enforce what it calls freedom of navigation in international waters.

China’s President Xi Jinping says Beijing has no plans to attack anyone, but will continue its policy of active defense.