If you wanted a sign of how bad things are in the Korean Peninsula, then you can gauge China’s latest moves as it lines its communist neighbor’s border with some 300,000 troops in preparation.

According to a report from Radio Free Asia, China is moving its troops to line the North Korean border either to brace for war on the Korean Peninsula or deal with a predicted refugee problem likely to occur with rising tensions, and the communist state’s inability to feed its people.

South Korean news outlet Chosun Libo reported the movements Monday:

China is preparing for a potential war on the Korean Peninsula by reinforcing missile defenses near the border with North Korea, Radio Free Asia reported Friday.

RFA quoted a North Korean source in China as saying the Chinese military late last year deployed another missile defense battery at an armored division in Helong, west of Longjing in the Yanbian Korean Autonomous Prefecture.

Military units in Yanbian were relocated from Heilongjiang Province, thus adding 300,000 troops along the border, the source added.

On top of the troops, Chosun reported that China is deploying anti-missile batteries near North Korean reservoirs by the Apnok and Duman rivers as well. Should there be a successful airstrike, the bursting reservoirs would flood parts of China, as well as wipe out a chunk of Chinese troops stationed nearby.

However, the movements could have a dual purpose. While the troops could be ready to march into North Korea at a moment’s notice, Chosun reported in December that the troops were also constructing refugee camps to harbor North Korean troops in the event of war. The amount of shelter and emergency food supplies is said to allow 500,000 refugees to live safely.

China has been North Korea’s most ardent ally, though that relationship has been strained to the breaking point. Chinese President Xi Jinping and North Korean dictator Kim Jong Un are reportedly not very fond of each other and insult one another behind closed doors. According to some reports, Xi sees Kim Jong Un’s relentless antagonism as harmful to China’s reputation and believes it interferes with business.

Kim, in the meantime, sees China’s continued cooperation with UN sanctions against it as insulting. Recently China has cut off refined oil products and major tourism to North Korea, badly damaging its already critical economy.

Despite the hard stances China is taking against North Korea, it has yet to completely forsake it. China has said it desires peace between North Korea and the U.S., however it may still defend North Korea should the U.S. attack.