Pyongyang can’t stop shooting (a) missiles into the sea and (b) itself in the foot.

At 7:36 a.m. Monday, local time, North Korea launched four missiles that flew about 600 miles over land before splashing into the Sea of Japan. As my colleague Anna Fifield reported, three landed within Japan’s exclusive economic zone, dropping about 200 miles from the coast.

The test was timed to provoke: It came not a month after North Korea tested a solid-fuel rocket that it claims is part of an intercontinental ballistic missile capable of hitting the United States, and three weeks after the assassination in Malaysia of ruler Kim Jong Un’s half brother, Kim Jong Nam, who had been under Chinese protection.

It also coincided with joint U.S.-South Korean military exercises on the southern half of the Korean  Peninsula and, to Beijing’s certain dismay, the opening of China’s National People’s Congress, the Communist Party’s tightly scripted, not-to-be-interrupted-or-overshadowed political spectacle.

Indeed, although North Korea has been getting on a lot of nerves lately, it may be China that is most acutely frustrated. And since China is North Korea’s only real ally, that could hurt Kim Jong Un.

Video: N. Korea fires more missiles into the sea near Japan (Reuters)

China and North Korea used to be tight. Mao Zedong once said the neighbors were as close as “lips and teeth.” But in recent years, China has grown frustrated with the North’s potentially destabilizing economic woes, as well as a nuclear program that, from Beijing’s perspective, keeps the U.S. military at the gate.

Although critics have long accused Beijing of propping up the Kim regime, the Chinese side responded to last month’s rocket test and assassination with what appeared to be a real piece of economic punishment: Beijing suspended coal imports — a financial lifeline for North Korea — until the end of 2017.

Monday’s test will only deepen Beijing’s displeasure. China is in the midst of a major campaign against U.S. plans to deploy the anti-missile Terminal High Altitude Aerial Defense (THAAD) system to South Korea. THAAD is a land-based missile defense system that would be operated by U.S. troops stationed in South Korea. Seoul and Washington argue it is a necessary defense against North Korea.

But China hates the plan. To Beijing, THAAD is a security threat designed to undermine the Chinese military, a “strategic plot” hatched by the Americans. In recent weeks, China has stepped up public criticism of the project and moved to punish South Korea for forging ahead with the plan.

>China’s party-controlled press is already musing about “destroying” or “blinding” the THAAD system. To express its displeasure with South Korea, China has also denied visas to pop stars and pulled wildly popular South Korean television dramas off the air. “Let’s see how far South Korean TV dramas and stars can go without strong support from the Chinese market,” read one editorial in the Global Times, a newspaper known for its nationalist tone.

“The THAAD installation is a mighty blow against strategic mutual trust between Beijing and Seoul,” the paper continued. “Ties will inevitably hit rock bottom, and this will be a loss for both sides. In the long-run, China needs to get ready to confront Seoul.”

“The U.S. and South Korea are not dealing with the THAAD issue very well because they have not fully considered China’s security concerns,” said Cui Zhiying, director of the Korean Peninsula Research Center at Shanghai’s Tongji University. “All parties should cooperate on this issue, instead of the U.S. and South Korea getting together to suppress China."

And that’s just it: China never liked North Korea’s missile tests, but right now they are particularly inconvenient. Interrupting China’s National People’s Congress with yet another missile test makes it harder for Beijing to rail against South Korea’s plans because it makes THAAD’s stated purpose — shooting down North Korean missiles — seem legit.

China on Monday expressed wary dismay at the latest development, with a spokesman for the Foreign Ministry saying Beijing “opposes” launches that undermine United Nations Security Council resolutions. Behind closed doors, Chinese cadres will no doubt have more to say to their erstwhile friends.

Xin Jin and Congcong Zhang contributed to this report.