It has been eight years since China overtook Japan as the world’s second-largest economy. Yet the Japanese government continued to provide China with development assistance usually reserved for poorer countries. Until now.
In Beijing for the first official visit by a Japanese leader since 2011, Prime Minister Shinzo Abe acknowledged China’s economic dominance by announcing an end to the aid. Instead, he pledged to forge deeper economic and political cooperation, in what is widely seen as a hedge against the volatile, America-first policies of President Trump.
The announcement — coupled with new cooperation agreements Mr. Abe signed on Friday with his Chinese counterpart, Li Keqiang — signaled a significant shift in a relationship that has been haunted by war and occupation and is still strained by territorial disputes and other issues, which, publicly at least, have receded into the background.
The subtext to the budding détente was Mr. Trump, whose go-it-alone approach to foreign relations has pushed the two historic rivals closer together.
As the American president has walked away from global trade pacts and tangled with traditional allies over tariffs, Japan and China have decided to set aside some of the tensions that have governed relations between them for years. Now they are cooperating more closely on trade issues and developing business partnerships that could help buffer against the instability that Mr. Trump has introduced to the region.
“From competition to cooperation, the Japan-China relationship is shifting to a new phase now,” Mr. Abe said at an appearance with Mr. Li following a ceremonial welcome on Tiananmen Square that included a cannon salute and a review of troops under crisp blue skies.
“We are neighbors; we’re partners who will cooperate with each other, rather than be a threat to each other,” Mr. Abe said.
The Japanese leader, who had long sought an official visit to the Chinese capital, was accompanied by foreign and trade ministers and more than 1,000 businesspeople, who he said had come to discuss joint infrastructure and other projects in countries throughout the region.
That signaled a greater focus on trade and investment, and a departure from the 40-year program of aiding Chinese development. Many saw that aid program, which began in 1978 in what both countries described as a new start to their relationship, as a form of atonement for Japan’s brutal invasion of China in 1937, which set the stage for World War II.
Japan has “ended its historical mission” to assist China financially, Mr. Abe said at a reception after his arrival on Thursday night. “Now, Japan and China are playing indispensable roles for economic growth not only in Asia but also in the whole world,” he said.
Mr. Li said on Friday that relations were “back to their normal trajectory.”
“I hope for even more progress,” he said, specifying President Xi Jinping’s signature “One Belt, One Road” program for investing in infrastructure and other projects across Eurasia. Japan has pointedly refused to sign on to the initiative, which faces growing skepticism in some countries.
But Mr. Abe signaled a willingness to support new joint projects as long as China conducts them within international standards of transparency, environmental protection and economic viability, a spokesman later said.
In a significant sign of closer economic cooperation, the two countries’ central banks also agreed to swap 200 billion renminbi, or 3.2 trillion yen — the equivalent of $29 billion — for use in financial emergencies. Other agreements covered protection of intellectual property and the environment.
Few expect the two countries to overcome their divisions easily or swiftly. During his meetings on Friday, Mr. Abe raised the issues of human rights as well as security, particularly surrounding the islands in the East China Sea that both countries claim, a spokesman, Takeshi Osuga, told reporters later.
“Without stability in the East China Sea, there can be no true improvement in the relationship,” he said, paraphrasing Mr. Abe.
Mr. Abe has visited China four times, meeting Mr. Xi on the sidelines of various international gatherings, but this was the first invitation extended for an official bilateral meeting. Mr. Osuga deflected a question about the role Mr. Trump’s policies played in nudging the two countries into closer cooperation.
In the nearly 40 years since Japan began funneling foreign aid to China, it has provided 3.65 trillion yen to support infrastructure, humanitarian projects and environmental protection.
Analysts in both countries said the decision to end the aid made sense in today’s context.
“Up to now, the relationship between Japan and China was that Japan was the modernized, developed country leading China in its modernization,” said Akio Takahara, a professor at Tokyo University who specializes in Chinese politics.
China has traditionally been reluctant to acknowledge the scale of Japan’s assistance, except to imply that Japan offered it out of a sense of responsibility following the bloodiness of World War II.
Yu Tiejun, vice president of the Institute of International and Strategic Studies at Peking University and a visiting scholar at the Massachusetts Institute of Technology, said that many Chinese knew little about the aid — “China hasn’t been telling much about the Japanese aid to its people,” he said — but that it was considered to have had a positive impact over the years.
Even so, he added, “China should have graduated a long time before.”
Bonnie S. Glaser, a senior adviser for Asia and a China expert at the Center for Strategic and International Studies in Washington, said the aid had made “an enormous contribution” to China’s economic transformation over the last four decades.
“Japan played a large part in that, but Japan has been given very little credit for it,” she said.
Japan never officially declared that the aid, most of which came in the form of loans that were discontinued 10 years ago, represented any kind of war reparations. But analysts in Japan say that did play a role, at least at the start of the program, and that many people saw it that way.
“The Japanese politicians who began the overseas development assistance in the first place had that in mind,” Mr. Takahara said. He added that given political sensibilities in Japan about formal war apologies, it was difficult for any official to declare openly that the aid was anything other than economic assistance for a developing neighbor.
Some historians dispute the idea that the aid represented a form of atonement.
“You could think of other reasons why Japan might have an incentive to be particularly generous with their aid that have absolutely nothing to do with any historical sense of guilt,” said Jennifer Lind, an associate professor of government at Dartmouth College and a specialist in Japanese war memory.
Japan “provided a lot of money to help China with the environment,” Ms. Lind said. “But it’s because Japan worried about the weather blowing pollution from China toward Japan. So they had a big incentive to help China figure out how to clean up its air.”
In 2007, Japan ended its yen loan program, which represented about three-quarters of its aid to China. What remained were small-scale grants made to local communities for individual projects.
Now, Japan is proposing that it cooperate with China on such projects in Southeast Asia. The advantage for Japan is that it can move away from direct competition with China on such projects and toward a program of cooperation that lets Japan dictate some of the environmental and labor standards.
“I think it’s a smart framing on the part of Japan to try and use this as an opportunity to start things off on a different foot with China,” said Kristi Govella, an assistant professor of Asian studies at the University of Hawaii at Manoa. “Of course, they can’t just say that they’re ending aid, because it would be a negative thing on the 40th anniversary of the Sino-Japanese friendship.”