*Editor's note: This story has been updated throughout.

State lawmakers have cranked up the volume on this message to city halls: We set the rules for drilling in Texas.

The House on Friday overwhelmingly approved legislation that would pre-empt local efforts to regulate a wide variety of oil and gas activities, stirring concerns in some towns that have sought to blunt the effects of drilling close to homes, schools and businesses.

Intended to clarify where local control ends and Texas law begins, House Bill 40 – widely known as the “Denton fracking bill” – is the most prominent of the flurry of measures filed in response to the North Texas town's vote to ban hydraulic fracturing within city limits.

“Municipal regulations have begun to erode the state’s pre-eminent role to regulate oil and gas development,” Rep. Drew Darby, the bill’s author, said on the House floor, saying the proposal “strikes a good balance.”

With a 122-18 vote, the chamber sent the bill to the Senate after a three-hour debate in which lawmakers shot down all attempts to add more protections for local control.

That vote came as oil and gas companies face increased pushback in other cities where the industry’s footprint has spread – particularly in the 5,000-square-mile Barnett. In some cases, neighborhoods are expanding closer to longtime drilling sites.

A litany of energy companies and industry groups support the bill, whose preamble states that the act “expressly pre-empts regulation of oil and gas operations by municipalities and other political subdivisions.”

In a statement Friday, the Texas Oil and Gas Association called the proposal “balanced, fair and essential to ensure that the state’s biggest job creator can continue to operate responsibly under robust and predictable regulation.”

Environmentalists disagreed.

"This is a dangerous power grab by Big Oil to stomp out the rights of communities to protect themselves from the worst impacts of dirty drilling," Luke Metzger, Director of Environment Texas, said in a statement." They won't settle for just overturning the Denton ban but are taking aim at ordinances across the state that limit drilling near homes, schools and parks as well as many other health and safety standards."

Darby, R-San Angelo, said he simply wanted to limit litigation – like the suits emerging from Denton’s vote – by combating a “patchwork of inconsistent regulation that undermines safe, consistent production of oil and gas.”

Environmentalists and some cities worry that the legislation will add to confusion about what municipalities can regulate and erode authority cities have long tapped to ensure health and safety. That’s partly because of the bill's broad definition of “oil and gas operations.”

Those concerns bubbled up in Friday’s debate.

"The way it is presently written, nothing is off limits,” said Rep. Sylvester Turner, D-Houston, calling the bill “a gold mine for lawyers."

The Texas Municipal League, which counts 1,145 Texas cities among its members, was initially among the bill’s fiercest critics — saying it could invalidate local drilling ordinances across Texas.

The league softened that message after Darby’s committee added language listing areas cities could still regulate, including fire and emergency response, traffic, lights and noise – but only if such rules were “commercially reasonable.” The language also allows them to enact some setbacks between drilling sites and certain buildings.

Darby also added what he calls a “safe harbor" provision, protecting cities from legal challenges if their ordinances have not triggered litigation in the past five years – another change that the Municipal League found more palatable.

That would presumably protect heavily drilled Fort Worth’s ordinance, which lawmakers routinely praise.

This month, Darby brokered a deal between the Municipal League and the Texas Oil and Gas Association in which both groups agreed to "support or be neutral to" the bill as written.

None of the proposed amendments — each geared at protecting elements of city ordinances — survived. Darby repeatedly referenced the agreement in asking that they be tabled.

Despite the agreement, some city officials remain upset.

Chris Watts, the mayor of Denton, said Thursday that the original bill was a “disaster,” and his city appreciates the compromise. But the compromise would still jeopardize key provisions of his city’s ordinance – particularly the fracking ban, he added.

“It’s almost as if it’s the lesser of two evils,” he said.

Bill Lane, public safety director and senior staff attorney for Mansfield, a city atop North Texas’ gas-rich Barnett Shale, said that even the compromise language that allows cities to enact some rules remains problematic. “The problem is, what the hell is ‘commercially reasonable?’” he asked.

Attorneys on both sides of the tug-of-war have struggled to find a consensus on the meaning of that limiting phrase, asking whether a 400-foot, 600-foot or 1,000-foot well setback would be “commercially reasonable.”

And what about noise rules that would bar activity at night?

“It’s going to be litigated, I can tell you that,” said Lane, who disagrees with Denton’s fracking ban but says urban areas need other tools to protect public health.

Darby said he understood those concerns, but didn’t consider them valid. The bill, he said, enshrined a few long-assumed police powers of cities into law for the first time.

“You can be proud of this bill, that we have set in statute protections for cities,” he said.

One Republican was among the small tally of lawmakers who voted against the bill: Rep. Tan Parker of Flower Mound, who chairs the party’s caucus in the chamber.

Flower Mound is home to an ordinance that has irked the industry, and Parker’s district nudges the city of Denton.

“My perspective is, personally, I support greater local control,” he said in an interview. “And that’s the reason why I supported Flower Mound and voted against the bill.”

Disclosure: The Texas Municipal League is a corporate sponsor of The Texas Tribune. A complete list of Tribune donors and sponsors can be viewed here.