TOKYO -- As the world reeled at the news of a North Korean intercontinental ballistic missile launch on July 4 -- an Independence Day "gift" for the U.S. -- Chinese President Xi Jinping and his Russian counterpart, Vladimir Putin, sat down for talks in Moscow.
The joint statement they released later that day could not have come at a more awkward time for U.S. President Donald Trump.
Xi and Putin called for "unconditional dialogue" among countries concerned with the Korean Peninsula -- especially the U.S. and North Korea. They might as well have asked Trump to bow to North Korean leader Kim Jong-un.
At this point, there is little doubt Xi made an empty promise to Trump on North Korea, when the two met in Florida in early April and agreed on a 100-day action plan. The plan centered on reducing the huge U.S. trade deficit with China, but Xi also pledged to help deal with the nuclear and missile threats from Pyongyang.
The deadline is near, and the North has shown no signs of even toning down the saber-rattling.
Dessert and airstrikes
North Korea has threatened to attack the U.S. mainland with a nuclear-tipped ICBM, though experts tend to agree that the reclusive regime is not yet capable of doing so. Either way, Trump wants China -- the North's traditional ally and biggest trading partner -- to apply more pressure on its unruly neighbor. Trump himself has increased the pressure on Pyongyang, warning that all options are on the table, including military force.
Xi's visit to Trump's Mar-a-Lago estate kicked off a tumultuous few months.
On the first night of the two-day visit, Xi spent four hours with Trump, engaging in some tough horse-trading. Toward the end of dinner, just as chocolate cake was being served, Trump dropped a bombshell: He informed Xi that the U.S. had "just fired 59 missiles" at an air base in Syria, despite China's consistent objections to such strikes.
Apparently caught off guard, Xi paused for 10 seconds and asked his interpreter to repeat what Trump had said.
Wang Huning, one of 25 Politburo members and a close adviser who typically accompanies Xi at important diplomatic meetings, had stepped out when Trump made his revelation. So Xi had to come up with a response on his own.
The Trump administration launched the strikes in response to the Bashar al-Assad regime's apparent use of chemical weapons in the Syrian civil war. In Trump's recounting of the meeting, Xi said, "It's OK," citing the brutality of using poison gas on children and infants.
This was a significant foreign policy reversal on Xi's part. But what were the Chinese president's motives for accepting the strikes?
It seems obvious he wanted to deflect U.S. pressure over trade. Playing along on Syria and, to an extent, North Korea, was likely to help that cause.
Xi must also have feared the prospect of U.S. strikes on North Korea this year -- a politically sensitive one for China. All his efforts to consolidate his power could unravel in the chaos that would inevitably ensue.
This autumn, the Politburo Standing Committee is due for a reshuffle at the Communist Party's twice-a-decade National Congress. The committee, chaired by Xi, is China's most powerful decision-making body.
Xi became general secretary of the party at the last National Congress, in 2012, before becoming president the following spring.
Now, most of the committee's seven members are set to retire due to age, though Xi and Premier Li Keqiang will stay on. The looming changes have triggered an intense tug-of-war between the president and his foes over the new leadership lineup. Xi wants to bring allies aboard and cement his dominant position.
One might say Xi agreed to the 100-day plan to buy time -- preventing U.S. military action against North Korea so he can concentrate on strengthening his hand at home.
Curiously, while the White House announced the 100-day plan immediately after the Trump-Xi meeting, the Chinese government announced it through state-run media five days later. By that time, Xi was already back in Beijing.
What was the holdup?
The truth is that the five days were devoted to intense debate, with some foreign policy hands stressing the importance of China's long-standing alliance with North Korea, as well as cooperation with Russia on Syria.
It was only after a telephone conversation between Xi and Trump on April 12, five days after their Florida meeting, that the plan was finalized.
Once the details were firmed up, China did take action. It immediately reached out to North Korea and proposed a comprehensive road map.
In addition to maintaining the Kim dynasty, the proposal included a framework for economic aid in return for North Korea's declaration of the "abandonment" of its nuclear program, according to sources -- though technically this would have been more of a freeze than an abandonment.
The backlash from Pyongyang was stronger than expected.
The sticking point, from Kim Jong Un's perspective, was the demand that he make his stance clear within 100 days. He has no intention of partaking in dialogue on the nuclear issue before his country achieves its weapons development goals.
Kim also wants to keep China out of it, as much as possible -- which explains his basic policy of insisting on direct talks with the U.S.
The standoff prompted Xi and Trump to speak again by phone on April 24. But tensions continued to escalate; eventually, two U.S. aircraft carriers would be dispatched to the Sea of Japan.
Snubbed by Pyongyang
For Xi, a particularly humiliating twist came on May 14, when the North launched a ballistic missile hours before the opening of a high-profile international conference in Beijing.
The conference was held to discuss China's Belt and Road Initiative -- its drive to build infrastructure and link itself to Europe by land and sea. China even invited a North Korean delegation, partly in an attempt to prevent Kim from disrupting the event. But the missile launch was a clear rejection of Chinese mediation on the nuclear issue.
The North had already started criticizing China through its domestic media mouthpieces, accusing it of toeing the U.S. line. China's attempt to broker a deal on the nuclear program had clearly failed, and a policy adjustment was in order.
Despite the snub from Pyongyang, which surely offended Xi, China did not clamp down on its neighbor. On the contrary, it shifted from cooperating with the U.S. to paying more consideration to the North and keeping in line with Russia, to a point.
Trump is losing patience, as illustrated by his administration's recent approval of arms sales to Taiwan and sanctions against a Chinese bank with links to North Korea. And Pyongyang is jubilant over its successful ICBM test.
Yet, while Xi's commitment to finding a solution within 100 days is all but certain to go unfulfilled, the empty promise has served a purpose. It let him off the hook with Washington, at least temporarily, as the Trump administration pulled its punches on trade and other issues.
In the meantime, Xi has continued tightening his grip on power at home.
Xi and Trump met again in Hamburg, Germany, on July 8, on the sidelines of the Group of 20 summit. As expected, their talks produced few tangible results.
Next up is the first round of a "comprehensive economic dialogue" with the U.S. in Washington, scheduled for Wednesday. China will be looking to paper over the failure of the 100-day plan, at least when it comes to North Korea.
Leading the Chinese delegation will be Wang Yang, a vice premier in charge of economic affairs. It will be a crucial moment for him in more ways than one.
Wang's diplomatic finesse in dealing with the U.S. could affect the future of the Chinese economy. His performance could also have bearing on his bid to join the Politburo Standing Committee.
After the G-20 summit, Xi flew back to Beijing and returned to the task at hand: defeating his political rivals.
For the president, the crucial juncture will come at the Communist Party's conclave in Beidaihe, Hebei Province. Current leaders and retired party elders gather at the seaside resort every summer to discuss pressing issues. It is there, behind closed doors, that the drama over the next leadership team is likely to reach its climax.