Shinzo Abe, the Japanese prime minister, arrives in Beijing on Thursday for a rare visit that marks a warming in relations between the world’s second and third largest economies.
Mr Abe’s three day official trip, the first state visit to China by a Japanese leader in seven years, will officially celebrate the 40th anniversary of a peace and friendship treaty.
But it is also the culmination of a years-long process of repairing ties in the wake of a disastrous falling out in 2012, when Tokyo "nationalised" disputed islands claimed by Beijing.
The incident prompted anti-Japanese riots in China, and kicked off a frosty spell that has only recently begun to thaw.
While the countries have long been foes rather than friends, analysts say Beijing and Tokyo have determined a stronger alliance is mutually beneficial amid the waning influence of the US in the region under the Trump administration.
Boosting trade and investment ties with Japan allows Xi Xinping, the Chinese president, to hedge against a deteriorating relationship with the US amidst a brutal trade spat.
For Mr Abe, China provides a buffer against the US president, who has at times kept American allies at arm’s length.
“The main driver of this shift…is the need for both Japan and China to adjust to changes in US foreign policy under President Donald Trump that have often reinforced impressions that US influence in Asia, and its commitment to allies there, are waning,” said Scott Seaman of the Eurasia Group.
Mr Abe and Mr Xi are expected to reiterate pledges to cooperate on North Korea issues, and an entourage of 500 Japanese business leaders will join their Chinese counterparts to attend an investment forum on collaboration in other countries.
Dozens of infrastructure and technology initiatives are expected to be announced, and could include countries signed up to China’s “Belt and Road" development programme.
China has been accused of creating debt traps to take advantage of these smaller economies, and Japanese participation could help allay those concerns as authorities have stressed the need for transparency in such projects.
Beijing and Tokyo have rowed for years over regional supremacy, and Japan’s bloody legacy of wartime occupation in China has never helped. The relationship hit bottom in 2012 given a territorial dispute over islands controlled by Japan, but claimed by China, in the East China Sea.
Public Chinese sentiment against Japan grew so hostile that angry protestors surrounded the Japanese embassy in Beijing, with consumers destroying Japanese cars, boycotting the brands and even ransacking sushi restaurants.
When Mr Abe and Mr Xi met for the first time two years later on the sidelines of a regional forum, they barely looked at each other while exchanging an awkward handshake.
Since then, the two world leaders have met half a dozen times, most recently during a conference in Russia.
While Mr Abe’s visit marks a symbolic shift in the relationship, Japan remains wary of Beijing’s strategic intent and influence in the region. But China has succeeded in promoting itself as a viable global partner at time when the US is pulling away.
“Trump’s sometimes rather jarring treatment of governments in the region, and elsewhere, has created an opportunity for China to redouble its efforts to pitch itself to Japan and other countries as an alternative to the US as a strategic and economic partner and dilute concerns about China’s rise,” Mr Seaman said.
Kristin Vekasi, assistant professor of political science at the University of Maine, and an expert on Japan-China ties, said the trade war with the US "seems like it’s helping bring them together a bit".
"In that sense, they’re actually on the same side… and if Japan leans away from the US because of decreased economic opportunities, there’s a potential for closer ties with China," she said.