France's constitutional council has rejected an attempt to overturn a ban on fracking, the controversial method of extracting gas from rock.
US-based firm Schuepbach Energy challenged a ban imposed in 2011 based on potential risks to the environment.
President Francois Hollande has opposed the technology, as have the Greens, a partner in the governing coalition.
France, which relies heavily on nuclear power, has some of the largest shale gas deposits in Europe.
Following the 2011 ban, Schuepbach, which had two exploration licences cancelled in southern France, appealed on four counts.
"The constitutional council threw out these four complaints and ruled that the disputed components of the 13 July 2011 law comply with the constitution," the council said in a statement.
The Constitutional Council, made up of judges and former French presidents, has the power to annul laws if they are deemed to be unconstitutional.
France's Energy Minister Philippe Martin said the ruling meant the law banning fracking, in which pressurised water, chemicals and sand are pumped underground to release gas trapped in shale formations, was now safe from other legal challenges.
"It's a legal victory, but also an environmental and political one," Mr Martin said at a news briefing.
The US Energy Information Administration estimates shale gas reserves worth five trillion cubic meters could lie in French soil, mainly in the Paris basin and the Rhone valley.
French oil giant Total is still awaiting a ruling after it separately appealed at the end of 2011 against the government's decision to ban its own exploration permit by the south-eastern town of Montelimar.