Residents in the Denver suburb of Broomfield recently voted to ban fracking for five years, raising the ire of the oil and gas industry. Kristen Wyatt/AP

A legal battle is brewing between the oil and gas industry and Colorado cities that have voted to ban shale gas extraction, raising questions about whether local governments, with the support of residents, can lawfully prohibit the controversial practice of hydraulic fracturing, or fracking.

The Colorado Oil and Gas Association (COGA) filed a lawsuit Tuesday against the towns of Lafayette and Fort Collins, Colo., which have passed ordinances prohibiting fracking, a gas-extraction process through which sand, water and chemicals are pumped into the ground to release trapped fuel deposits.

Environmentalists argue that fracking can contaminate local water supplies and cause other ills, like increasing the output of climate-changing greenhouse gases. In September, environmental groups warned of potential contamination by ruptured oil and gas industry infrastructure as Colorado reeled from devastating floods.

Laurie Kadrich, a city official in Fort Collins, told Bloomberg news that the lawsuit did not come as a surprise.

“As a city, we have a responsibility to defend the voter-approved ordinance, so we’ll be looking into the contents of the lawsuit and we’ll respond appropriately,” Kadrich said.

Fort Collins voters decided on Nov. 5 to ban fracking for five years and Lafayette voters changed the city’s charter to ban the practice altogether.

The COGA issued a press release Tuesday saying that state law as interpreted by the Colorado Supreme Court prohibited local bans on fracking, and that the cities’ actions would harm 100,000 people who they say rely on the state’s fracking industry for jobs.

“That COGA has had to take this action further demonstrates the huge disservice self-described ‘fractivists’ have done to our communities in promoting energy bans,” COGA president Tisha Schuller said.

“Instead of working constructively with industry and city leaders, extremists have used fear and misinformation to lure cities into passing bans which they know are illegal and will cost staff time and taxpayer money,” Schuller added.

“If there was any other way to deal with the blatant illegality of these bans, our members would certainly pursue it.”

Broomfield, another Colorado city that recently voted to ban fracking for five years, promted a different lawsuit filed Tuesday by pro-fracking group Broomfield Balanced Energy Coalition (BBE) against the way city officials handled the vote and ballot counting.

"The best thing for us is for the election to be taken back," BBE co-chair Lee Kemp told Platts news.

"The process wasn't fair and was invalid."

Gary Wockner, director of Colorado Clean Water Action, told Al Jazeera that his organization sees the oil and gas industry as trying to suppress democratic action.

“We think they’re trying to overturn democracy. The will of the voters is clear. They do not want to be fracked,” Wockner said. Other cities in Ohio, Pennsylvania and New York have faced similar lawsuits from the oil and gas industry when they attempted to pass local bans on fracking, he said.

“This industry spent hundreds of thousands of dollars trying to buy the election, and they were not successful. Now they’re trying a last ditch effort,” Wockner said.