French leaders have shown remarkable foresight when it comes to China.

In the early 19th century, Napoleon predicted that “the sleeping giant’s awakening would make the whole world tremble”.

Charles de Gaulle, more than 150 years later, showed his visionary acumen when he made France the first western power to establish diplomatic relations with communist China in 1964 – in defiance of strong opposition from the United States. Georges Pompidou became the first European head of state to visit China in 1973.

Now President Emmanuel Macron is carrying the torch as he seeks to make France Europe’s pioneering partner with the communist power.

What China, East Asia have to fear from Macron’s hollow ‘victory’ in France

Indeed, the 40-year-old leader concluded a high-profile trip to China this week, suggesting both nations shared an ambition to play a bigger role on the world stage.

Despite tricky trade and investment issues between the world’s second and seventh largest economies, both nations shared views on the promotion of globalisation, free trade, the overhaul of global governance, climate change and anti-terrorism.

Under US President Trump’s isolationist “America First” policy, Paris and the EU have been forced to seek international cooperation beyond the Atlantic alliance.

US, Japan, India, Australia ... is Quad the first step to an Asian Nato?

France has long competed with Germany and the United Kingdom to become China’s top strategic partner in Europe. With British Prime Minister Theresa May preoccupied with Brexit and German Chancellor Angela Merkel failing to form a coalition government, Macron is now leading a campaign for a more integrated euro zone which Beijing supports. France, the only nuclear power and the only permanent member of the UN Security Council in the EU, has become a central pillar of a unified continent.

China needs allies in the West as it faces unprecedented challenges to the realisation of President Xi Jinping’s “national rejuvenation” ambition.

The recent creation of a military coalition between US, Japan, India and Australia is a US-led effort to contain China’s rising assertiveness. China has also suffered diplomatic setbacks as its relations with almost all major regional players have sunk to its lowest since Beijing began its Open Door policy in early 1980s.

Opinion: Forget Mao Zedong, Xi Jinping is more Charles de Gaulle

China is also in sorely need of France’s support of its “Belt and Road Initiative” to boost global trade, which faces widespread suspicion in the West. Washington suspects Beijing is using the initiative as a tool to promote its own financial and commercial standards that rival those built on the US-led Bretton Woods system. Macron began his China trip in the northern city of Xian, the starting point of the ancient Silk Road, and spoke of his interest in the initiative during the trip.

Beijing needs a nod from a Western power like France to establish itself as an alternative to the US in a new world order. Beijing has long appreciated France’s independent foreign policy which is often deviates from Washington’s.

How can communist Vietnam be friendlier to the US than China?

But that’s not to say China and France are a perfect diplomatic fit. Though Macron might be more accommodating towards China, France could not be China’s true ally for both ideological and strategic reasons. Paris has had military deals with all China’s major regional rivals, such as Australia, Indonesia, India and Japan. France also plays a major role in defence building in the region, which will inevitably collide with an “awakening giant” as Napoleon warned two centuries ago.

Cary Huang, a senior writer with the South China Morning Post, has been a China affairs columnist since the 1990s