Japan’s prime minister, Shinzo Abe, will arrive in Beijing on Thursday amid a thaw in bilateral ties that would have seemed impossible just a few years ago.

Relations between the Asia’s two biggest economies deteriorated dramatically in 2012 when the Japanese government “nationalised” a group of disputed islands in the East China Sea known as the Senkakus in Japan and the Diaoyu in China.

The move sparked officially sanctioned protests in several Chinese cities, forcing Japanese firms to temporarily close their premises. The dispute hit Japanese investment in China, whose coast guard vessels continue to make regular incursions into waters around the islands.

Despite continued friction over the Senkakus and Japan’s war record, mutual concern over Donald Trump’s protectionist trade policy has helped pave the way for Abe’s summit with Chinese leader Xi Jinping, in the first official visit to China by a Japanese leader for seven years.

Officials in Tokyo said Abe’s three-day visit would put relations on a “new trajectory” as the countries mark the 40th anniversary of a peace and friendship treaty.

When they meet on Friday, Abe and Xi are likely to overlook historical and territorial disputes and focus instead on closer economic cooperation.

With its economy feeling the pain from its trade war with the US, China is eager to attract more investment from Japan, while Tokyo is desperate to prevent any damage to its export-led economy that could result from a prolonged slowdown in China, its biggest trade partner.

“We don’t want to see US-China trade frictions damage the international system,” Kyodo news quoted a Japanese government official as saying.

But Abe, who will be accompanied by 500 business leaders, must also ensure that economic détente with China does not provoke Trump, who has also imposed tariffs on Japanese steel and aluminium and threatened to do the same with its cars and auto parts.

However, some analysts believe the president’s protectionism could spur Tokyo and Beijing into developing much closer ties.

“The trade war with the US seems like it’s helping bring them together a bit,” said Kristin Vekasi, assistant professor of political science at the University of Maine, and an expert on Japan-China ties. “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.”

Others, though, said Abe’s visit was unlikely to result in a significant diplomatic breakthrough. “There is no reason to believe a single visit by PM Abe to Beijing would right all the baggage that have accumulated in Sino-Japanese relations,” tweeted Dali Yang, an expert in Chinese politics from the University of Chicago.

Tokyo has already signalled its intention to put bilateral economic ties on a new footing, announcing this week that it was ending official development assistance to China, worth 3.65 trillion yen (US$32.4bn) over the past 40 years. Officials in Tokyo said economic aid had “fulfilled its role” in transforming China’s economy.

While the two leaders will discuss joint investments in infrastructure in other countries in the region, Japanese officials played down the prospect that Abe would sign up to China’s multibillion dollar Belt and Road Initiative.

The leaders are also expected to agree on a series of more modest measures that, given the tensions of the past few years, carry symbolic significance.

They include the resumption of reciprocal naval visits after a seven-year hiatus and the possible loan of pandas to Japanese zoos.

Japanese media reported that Abe would also ask Xi to lift a ban on food imports from Fukushima that China introduced in the wake of the March 2011 nuclear meltdown.