BEIJING - French President Emmanuel Macron urged Chinese leaders Tuesday to open their markets wider and warned lack of action might prompt other countries to close their own markets.

Macron's comments in a speech to Chinese and French entrepreneurs were a rare sobering note during a visit in which both governments appeared eager to promote closer relations. The trip comes at a time when Britain's impending departure from the European Union and U.S. President Donald Trump's more inward-looking policies have opened up the prospect of a realignment of global influence.

Macron pointed to France's 30 billion euro ($36 billion) trade deficit with China last year and warned it was politically unsustainable. Such warnings are common among economists and political analysts, but it is unusual for a visiting leader in Beijing to address a potentially divisive issue so directly.

"If we don't deal with this responsibly, the natural reaction, the one we've had for too long, will be to close up on both sides," the French president said.

Macron's visit was billed by his government as aimed at expanding French and European relations with China. He said earlier he hoped to forge a wide-ranging partnership on climate and other issues.

In a meeting with Premier Li Keqiang, China's top economic official, Macron said the two sides have the potential to develop co-operation in an array of areas including scientific research, health and agriculture.

The two sides also need to "settle on an economic and geopolitical plan for the affairs of our world," Macron told Li.

On Monday, President Xi Jinping welcomed Macron in unusually effusive language, declaring France and China "great countries with splendid histories." He said their interaction had "deep historical significance for the world."

Despite their public warmth, Macron's visit is overshadowed by mounting trade tensions.

Beijing had looked to Britain as an ally in the European Union. London opposed demands by other governments for tougher anti-dumping action against low-cost Chinese imports. Its departure might increase pressure on China to find new allies within the trade bloc.

Britain had promoted itself as a platform for Chinese businesses in Europe but its appeal might be eroded by the reduction in access to the remaining EU members. That might lead Chinese companies to divert investment to France, Germany or other bloc members.

A key issue for Macron, invoked several times during his visit, is reciprocity, or obtaining the same level of access for European and other foreign companies to China's state-dominated economy as Chinese companies enjoy abroad.

Macron, travelling with a French business delegation, wanted to secure deals that might produce greater access to China's growing market.

British Prime Minister Theresa May is to visit Beijing this month as part of her government's effort to nurture a new global role following its departure from the EU in 2019.

That comes after a British-Chinese economic dialogue in December at which the two sides pledged to promote London as a centre for transactions in China's yuan currency.

Also this week, a former British prime minister, David Cameron, is scheduled to meet Chinese leaders as head of a 750 million pound ($1 billion) fund to invest in railways, ports and other facilities between China and Britain.