Narendra Modi and Moon Jae-in, the leaders of India and South Korea respectively, had much in common when they came to Washington within days of each other in the last days of June to meet their U.S. counterpart Donald Trump for the first time.
Ahead of Modi's visit to Washington, Indian and Chinese forces were involved in a standoff on their border with Tibet, a dispute that underlines the two countries' ongoing territorial disagreements and their broader strategic rivalry.
Likewise, Moon took office in May under pressure from Beijing to unwind his predecessor's commitment to a U.S. antimissile system installed in South Korea earlier this year to defend the country against possible attacks from North Korea.
Modi and Moon's China problems are clear enough. Less obvious in Washington is that both leaders potentially have a big U.S. problem.
The Trump administration has engaged the Asia-Pacific robustly since coming to office. Japan's Prime Minister Shinzo Abe's has visited the U.S. twice. China's President Xi Jinping and Australian Prime Minister Malcolm Turnbull have visited. Philippine leader Rodrigo Duterte and Thai Prime Minister Prayuth Chan-ocha are invited.
But the intensity of engagement has not been matched by any level of coherence in policy, with Trump openly at odds with his officials over everything from defense spending in South Korea to implementing refugee deals with Australia.
America's allies all the while have been traveling across the Pacific Ocean to Washington to see the new president in a sense of friendship, but also with a touch of panic.
Both Modi and Moon arrived in Washington in June as relative neophytes in the U.S. Modi was banned from America before he was elected, for his alleged role in failing to stop the massacre of Muslims in his home state of Gujarat in 2002. Unusually for a South Korean leader, Moon had never traveled to the U.S. in an official capacity before his visit to the White House in June.
Dealing with the Donald
Such inexperience is easily solved by time in office. Not so simply managed is another issue for just about any world leader trying to deal with the U.S. -- how to manage the volatile and unpredictable incumbent of the White House.
Moon felt the full force of Trump's defining "America First" ideology during his visit. At a Rose Garden ceremony which normally operates as a polite, face-saving ritual for visiting leaders, Moon was forced to endure sharp criticism from Trump over South Korea's trade barriers and alleged backsliding on support for U.S. troops stationed in the country.
Only the day before, Trump's national security adviser for Asia had told journalists in a background briefing that South Korea was "far from a laggard" on security burden sharing and, in many respects, was a model ally on defense spending. Such reassurances clearly mattered little to Trump once he was in front of the microphone.
Modi suffered no such public censure, only because Indian-U.S. trade is not substantial and Washington has no troops of its own stationed on Indian soil.
On foreign policy, as with domestic issues, Trump remains an ill-disciplined and inattentive president who can be as vindictive one moment as he is charming the next.
In such circumstances, for allies and partners alike, having an adversary in common in the form of China is a blessing, as it gives them all something around which they can more genially coalesce.
Modi and Moon's trips coincided with rising tensions between the U.S. and China, something that most officials and commentators in Washington had been expecting.
Trump had smothered Xi Jinping with praise after their April summit in Florida, saying the Chinese leader was a "great guy" who had promised to help out on North Korea. The pair also agreed a "quick fix" for a number of contentious trade disputes.
Such a honeymoon was never going to last. The Chinese are willing to countenance sanctions against North Korea but never to the point where it destabilizes their neighbor. Equally, a few small trade deals were never going to meet Trump's core demand for a significant reduction in America's bilateral trade deficit with China.
In late June, the U.S. also announced a new arms sales package to Taiwan, something that is mandated by Congress but which will anger Beijing nonetheless.
Merely sharing a difficulty in dealing with China will not be enough to sustain ties between Washington and New Delhi and Seoul.
On trade, for example, Trump is making the same demand of South Korea and Japan that he is of China -- that they cut their bilateral trade surpluses with the U.S.
Equally, any trade actions against China will inevitably hit Japan and South Korea, which both count their neighbor as their biggest trading partner. A trade war with China, after all, given the interlocking regional reliance, is a trade war with Asia.
It seems inevitable that Trump and Moon, though they did not publicly disagree on North Korea after their first meeting, are likely to clash on the issue in future. Moon supports building bridges with Pyongyang, at least initially, whereas the Trump administration has declared that such policies have failed.
India, too, has enough problems of its own with China without inflating them further. For fear of inflaming Beijing, New Delhi recently declined to invite Australia, a staunch U.S. ally, to join regional naval exercises.
Modi and Moon come from different political cultures and face distinct geopolitical challenges. For the U.S. to keep them in the Western camp -- relatively free from Chinese pressure to cut deals -- Washington needs sustained and sophisticated diplomacy which can both address America's reasonable complaints about trade practices without alienating both countries as allies and partners.
In short, keeping India and South Korea onside will require all the kinds of governing qualities that Trump has so far illustrated he does not have.
Richard McGregor is a Washington-based journalist and author. His latest book, Asia's Reckoning: China, Japan and the Fate of U.S. Power in the Pacific Century, will be published in September by Viking Press.