Ireland is to ban onshore fracking, making it one of a few countries to prohibit the gas extraction method in an effort to preserve the environment.

The Petroleum and Other Minerals Development (Prohibition of Onshore Hydraulic Fracturing) Bill 2016 will be signed into law by President Michael D. Higgins, after it passed in the Seanad (Senate) on Wednesday, following its passing in the Dail (Parliament) in May.

Fracking is the process of extracting gas from shale rock using high-pressure water and chemicals. The chemicals used in this process can damage the environment and groundwater, while the process can release methane gases.

“This ban is a great victory for the local campaigners who have mobilized and educated themselves, their communities and their elected representatives on the threat fracking poses to local water, regional employment and global climate,” said Kate Ruddock from the Environmental Pillar (EP), a coalition of 26 Irish NGOs.

“All around the world communities are campaigning to keep fossil fuels in the ground and to put citizens at the heart of a new, clean, healthy energy system,” she added. “This victory is a tribute to their solidarity and is a shot in the arm for our common cause of a fossil free future.”

The bill, brought by Sligo-Leitrim TD (Member of Parliament) Tony McLoughlin, received support from across the Irish political spectrum as well as the Irish public. Last month, a number of TDs attempted to amend the bill to add offshore fracking to the ban, but it was defeated in the Dail.

Ireland moves to become 1st country to divest from fossil fuels in parliamentary vote https://t.co/UW7CFrNk3t — RT (@RT_com) January 28, 2017

A public consultation launched earlier this year received about 8,000 submissions, and only one was opposed to the ban, EP said.

Ireland is the fourth EU member state to ban fracking, after Bulgaria, France and Germany. The Australian state of Victoria and New York State in the US have also banned it, while Maryland became the first US state with known gas reserves to ban fracking in March.