Analysts say China is adopting a flexible approach to the United States strengthening its presence in Asia to exert pressure on North Korea because Beijing has only limited options to deal with its reclusive neighbour.
Beijing has recently toughened its rhetoric towards Pyongyang as tensions in the Korean Peninsula rise following provocative moves by North Korean leader Kim Jong-un, but analysts say the Chinese leadership will not abandon its ally because that would cost Beijing a strategically important role on the peninsula.
However, leaving Pyongyang unchecked is also not an option as Beijing is under international pressure to contain the crisis.
"China is unwillingly caught up in the crisis," said John Delury, a North Korea analyst at Yonsei University in Seoul. "China alone cannot solve the crisis. China is not the superpower that people sometimes think it is. They don't hold the key, but they are the key player."
China has already sided with Washington in imposing United Nations Security Council sanctions on Pyongyang after its third nuclear test in February.
But tensions on the Korean Peninsula have continued to rise, with Pyongyang warning of a war and looking set to test a missile. The crisis is expected to be centre stage at talks between US Secretary of State John Kerry and Chinese officials in Beijing this weekend.
Beijing, which has criticised the US pivot to Asia as an effort to contain China, normally does not want to see Washington interfering in regional affairs.
But analysts said China had refrained from tough anti-American remarks after the US approved the sale of fighter jets to South Korea and launched a joint military exercise with Seoul last month.
"Beijing is embarrassed to criticise the US this time as the situation in the Korean Peninsula will be more chaotic if Beijing gives strong back-up to Pyongyang," said Edward Chen I-hsin, a political analyst at Taiwan's Tamkang University.
"Beijing will instead let Pyongyang learn a lesson first, and then Pyongyang may be willing to go back to negotiation."
Pang Zhongying, who is a professor of international relations at Renmin University, said China and the US may see whether they can co-operate to contain Pyongyang. "China needs a stable environment, and the US presence in the region can help achieve that, even though some believe the US is hegemonic," he said.
Showing Beijing's dismay at the path Kim is treading, President Xi Jinping said on Sunday that no country should be allowed to cause chaos "for selfish gain". Foreign Minister Wang Yi said China would not allow trouble-making on its doorstep and ministry spokesman Hong Lei delivered a similar warning.
June Teufel Dreyer, a political science professor at the University of Miami, said it's a delicate issue for Beijing because Kim's actions gives Japan reasons to strengthen its military power.
Beijing fears that Kim might force the US to remove him from power - a scenario that would see North Korea lose its status as a buffer zone that keeps foreign forces from China's border and gives Beijing more influence in the region. "China does not want to go so far as to destabilise North Korea," she said.
Despite supporting the UN sanctions, China has never disclosed what it has done to implement them. Dreyer also said China might not cut food and fuel aid to North Korea, because that could lead to North Koreans fleeing to China.
Pang said: "North Korea is becoming a headache for China.
"China is aware its influence on North Korea is diminishing because Pyongyang believes it does not have to heed Beijing's concerns."