(Jason Aldag/The Washington Post)

There’s never a great time to fire off rockets potentially capable of carrying nuclear warheads, but China has been left in an awkward position by the timing of North Korea’s latest ballistic missile test, experts said.

Pyongyang said Monday that this weekend’s test of the “medium- to long-range” missile had been successful, according to the official KCNA news agency. But there was probably a collective groan in Beijing.

The missile launch took place while President Trump was playing host to Japanese Prime Minister Shinzo Abe, and it will intensify pressure on China from both their countries to do more to restrain North Korea’s nuclear ambitions.

The United States and Japan, along with South Korea, requested an urgent meeting of the U.N. Security Council in New York on Monday night to discuss the incident. Russia’s Foreign Ministry also expressed concern, the state-run RIA Novosti news agency reported.

China’s Foreign Ministry said Monday that it opposed the test, with spokesman Geng Shuang telling reporters that his government would “take a constructive and responsible part” in the discussions at the United Nations.

The missile test was conducted just as Sino-U.S. relations were beginning to look up, a few days after Trump held what the White House said was an “extremely cordial” call with Chinese President Xi Jinping. But Trump has made clear in the past that he does not think China is doing enough to rein in its ally in Pyongyang.

Zhang Liangui, a Korea expert at Beijing’s Central Party School, which trains Communist Party officials, said the timing was “well thought through” by Pyongyang to undermine China’s ties with the United States.

“It clearly intended to affect the development of Sino-U.S. relations,” Zhang said. “But what matters is how China and the United States handle it.”

The test also came as China campaigns hard against U.S. plans to deploy the anti-missile Terminal High Altitude Aerial Defense (THAAD) system to South Korea, which Beijing considers a threat to its security.

It was a timely reminder to the Trump administration of why those missile defense plans are important, but also, experts said, to the candidates in this year’s presidential election in South Korea, where public opinion on the issue is divided.

“There was opposition in South Korea to the THAAD deployment,” said Cui Zhiying, a Korean affairs expert at Tongji University. “But after the missile test, I fear these opposition voices will be greatly diminished.”

In an editorial Monday, the official English-language China Daily newspaper said the missile test provided “a good excuse” for the United States and its military allies to step up their cooperation.

As usual, Foreign Ministry spokesman Geng argued that the cause of North Korea’s nuclear program was its dispute with the United States and called on “all relevant parties to refrain from provoking each other and escalating tensions in the region.” 

China has long said that “dialogue and consultation” are the only way forward, but the Obama administration had refused to talk unless North Korea first pledged to denuclearize.

In an editorial Monday, China’s nationalist Global Times newspaper called North Korea’s nuclear weapon and ballistic missile program a “severe annoyance for Northeast Asia,” but also said that Pyongyang faces a “very real” military threat, as well as harsh sanctions. 

“We can imagine the level of its upset and rage,” it said. “. . . If Washington keeps cracking down on Pyongyang’s nuclear development while turning a blind eye to North Korea’s concerns, their current confrontation will develop into an absurd struggle.” 

Earlier in the day, Japan called on China to take stronger action against North Korea after the missile test, the first conducted by Pyongyang since Trump took office. It said the test had improved the ability of Kim Jong Un’s government to put a nuclear warhead on a missile.

“As a permanent member of the Security Council and chair of the six-party talks, and as a country that accounts for 90 percent of North Korea’s trade, China’s role is extremely important,” said Yoshihide Suga, Japan’s chief cabinet secretary, according to Bloomberg News. “As the government, we’ll continue to push China for constructive involvement at various levels.”

Before taking office, Trump vowed to prevent North Korea from acquiring the capability to strike the United States with a nuclear weapon. In a joint appearance over the weekend, Abe called the test “absolutely intolerable” and Trump said he stands by Japan “100 percent.”

China is North Korea’s primary ally and accounts for more than 70 percent of its trade, as well as providing food and energy aid. Although it has supported limited sanctions by the Security Council, it is reluctant to take firm economic action that could destabilize the regime. 

North Korea has conducted five nuclear tests, including two last year, although its claims of being able to mount a nuclear warhead on a missile have never been verified independently. Kim said in his New Year speech that the North was close to test-launching an intercontinental ballistic missile (ICBM), potentially threatening the continental United States, which is about 5,500 miles from North Korea.

China is unlikely to support tougher punishment for North Korea unless and until it tests an ICBM or a nuclear weapon, said Euan Graham, director of the International Security Program at the Lowy Institute in Sydney. But he added that the latest test, which appeared to be the second outing for a missile that could be fired from a submarine, was a “fairly significant step up the ladder” and could threaten U.S. bases in Asia.

Luna Lin and Xin Jin contributed to this report.