The Sino-Japanese move underscored Chinese President Xi Jinping’s efforts to lessen his country’s exposure to the U.S. market but also indicated a certain amount of pragmatism on the part of Japanese Prime Minister Shinzo Abe.

“From competition to coexistence, Japanese and Chinese bilateral relations have entered a new phase,” Abe told reporters in Beijing after meeting with China’s top two leaders. “With President Xi Jinping, I would like to carve out a new era for China and Japan.”

AD

AD

Xi also struck a remarkably upbeat note about the neighbors’ relationship, saying they should move in a “new historic direction” by working together at a time of growing global “instability and uncertainties.”

“Sound and stable development of China-Japan relations would fundamentally benefit the people of both nations, and that is something that the regional and the international community want,” he said.

This was their first official meeting in seven years and was a sharp departure from their last encounter, which took place in Beijing on the sidelines of a multilateral forum in 2014. On that occasion, neither Abe nor Xi could muster the faintest hint of a smile, and they could hardly wait to finish their handshake for the photographers.

AD

That encounter came during the days of a heated territorial dispute that brought the countries to the brink of military conflict.

AD

That dispute, over a set of islands controlled by Japan, has not been resolved. But this year, on the 40th anniversary of the Sino-Japanese friendship treaty, the two leaders are finding a way to put the two countries’ differences behind them, superficially at least.

Abe was treated to a full red-carpet welcome by Premier Li Keqiang, inspecting a guard of honor and being celebrated at a reception in the opulent Great Hall of the People.

This was accompanied by the somewhat startling sight of Japanese and Chinese flags flying together along the wide central boulevard between Tiananmen Square and the Forbidden City, fluttering in front of a huge portrait of Mao Zedong, the father of Communist China.

Memories of Japan’s aggression against China in the first half of the 20th century remain strong here.

Abe brought 500 business representatives with him, and Japanese and Chinese companies had signed deals worth $18 billion during the visit, Li said. He hailed the deals as a sign of the “bright prospects” for the countries’ economic relationship.

AD

AD

Their two central banks also signed a three-year credit swap agreement that will allow them to exchange $30 billion worth of each others’ currencies, a measure that will make it easier for banks to facilitate trade between the two countries.

“Vigorous trade will bring the bonds between our people ever closer,” Abe said Friday.

They also signed agreements relating to elder care and the securities market, although details were vague. And they pledged to work together on joint developments in Southeast Asia and to promote a Chinese-led regional trade deal called the Regional Comprehensive Economic Partnership.

There is still much mistrust between the longtime rivals. For one, China is highly suspicious of Abe’s efforts to revise Japan’s pacifist postwar constitution, and for another, Tokyo thinks Beijing is intent on regional domination.

But their focus on common interests reveals both leaders’ concerns about their economies.

AD

AD

China is trying to shore up other big markets — it is Japan’s largest trading partner — as President Trump’s tariffs begin to bite when China’s domestic economy is cooling.

And Japan is concerned about becoming collateral damage in the trade war and about the shrinking of its market as its population ages. China’s middle class totals about 250 million people, double the entire population of Japan, representing a tantalizing opportunity for Japanese consumer goods companies.