Philippe Wojazer / Reuters French President Emmanuel Macron attends a news conference with NATO Secretary-General Jens Stoltenberg (not seen) at the Elysee Palace in Paris, France December 19, 2017. (REUTERS/Philippe Wojazer)

France’s parliament has approved legislation banning all oil and gas production within the country and its overseas territories by 2040.

Under the law, which passed a final vote on Tuesday, France will no longer grant new fossil fuel exploration permits or renew existing drilling permits in an effort to slow global warming by reducing carbon emissions.

French President Emmanuel Macron, who has carved out a leading role for his country in the fight against climate change, tweeted that the legislation was the first of its kind across the world.

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

The law’s passage may be historic, but it’s largely symbolic since just 1 percent of the country’s oil consumption is produced domestically, according to The Associated Press.

According to the U.S. Energy Information Administration, France produced roughly 16,000 barrels of petroleum per day in 2016, a minuscule amount compared to countries like Saudi Arabia, which produced roughly 10.4 million barrels per day that year. Despite its new legislation, France will continue to import and refine oil, Reuters reported.

When the draft bill of the legislation was unveiled in September, French Environmental Minister Nicolas Hulot said he hoped it would inspire other countries to follow suit. He tweeted Tuesday that the law’s passage offered “proof that our generation can take care of future generations.”

Under Macron’s administration, France has moved to more aggressively embrace renewable energy and take steps to reduce dependence on fossil fuels. In July, the country announced it would ban the sales of gas and diesel cars by 2040.

The French president has tried to claim the mantle of global climate leadership that President Donald Trump abandoned after the United States pulled out of the Paris climate accord in June.

To the ire of many Democratic lawmakers in the U.S. and environmental activists around the globe, Trump has sought to roll back Obama-era initiatives meant to combat global warming and ramp up domestic fossil fuel energy production, which includes reviving the rapidly declining U.S. coal industry.