In a historic first, France has passed into law a sweeping environmental agenda that symbolically puts the European nation at the forefront of climate leadership.

On Tuesday, the French National Assembly voted to immediately ban any new licences for oil and gas exploration, and to cease all oil and gas extraction in mainland France and all its territories by 2040.

The new laws also make permanent a former prohibition on fracking within France, coming just a week after a major US study provided the strongest evidence yet that hydraulic fracturing affects human health.

The freshly officialised environmental regime effectively makes France the first nation in the world to commit to an outright ban on all oil and gas production – by fracking or other means – although Costa Rica previously instituted a moratorium on all petroleum exploration and extraction until at least 2021.

Very proud that France has become the first country in the world today to ban any new oil exploration licences with immediate effect and all oil extraction by 2040. #KeepItInTheGround #MakeOurPlanetGreatAgain — Emmanuel Macron (@EmmanuelMacron) December 19, 2017

"Very proud that France has become the first country in the world today to ban any new oil exploration licences with immediate effect and all oil extraction by 2040," French President Emmanuel Macron tweeted.

He included the not-so-subtle #MakeOurPlanetGreatAgain hashtag – it's the title of France's official climate plan that echoes US President Trump's oft-repeated campaign slogan to 'Make America great again'.

In contrast to the progressive gestures of the French, the American leader has signalled an unwavering embrace of fossil fuels, with the administration indicating the US will back out of the UN Paris climate agreement, declaring "the war on coal is over" – even though the US government acknowledges there's no convincing alternative explanation for why climate change is happening.

But while France's bold bans are certainly historic, they are also largely symbolic. The European nation produces the equivalent of about 815,000 tonnes of oil per year – only a few hours' worth of Saudi Arabia's annual output – with 99 percent of the country's oil and gas being imported.

Nonetheless, it's an important step that could in turn be followed by other countries around the world, especially since the tide is turning right now on fossil fuels.

Just a week ago, the World Bank announced it would no longer offer financial support for oil and gas exploration after 2019.

France is even luring US climate scientists abroad after nearly 2,000 American researchers applied for French grants, having experienced a perceived "devaluing of science" under the Trump administration.

In any case, France's ecology minister Nicolas Hulot says the new French bans "ensure consistency between our laws and our climate commitments under the Paris agreement… to remain below the 2 degrees Celsius limit, we must leave the majority of fossil fuels underground".

While acknowledging France's production of oil and gas is vastly outweighed by its consumption of imported fossil fuels, Hulot told French newspaper Sud-Ouest that nonetheless "we are the first country to take these type of measures", saying the action "will create, I hope, a contagion effect".

It's too early to know if that will happen, but with everything we know about the dark environmental future that may be ahead of us, every little bit helps – and right now we'll take all the shining symbols we can get.