Colorado regulators grappling with a historic energy boom that’s pushing oil rigs to the very doorsteps of suburban schools and homes were among the first in the nation to require companies to disclose the chemicals they use in their new drilling techniques.

Now, the regulators have issued what they tout as the country’s toughest energy drilling regulations, requiring rigs to be at least 500 feet away from occupied buildings and take other steps to limit pollution.

But few are pleased, underscoring the difficulties that governments across the country are facing as they try to regulate an industry that is moving ever closer to people’s neighborhoods but also contributing jobs and millions of dollars to local economies.

“Colorado has been on the leading edge of” regulating the energy boom, said Bruce Baizel, who tracks regulations nationwide for the environmental group Earthworks. “It’s trying to muddle through and not satisfying anybody.”

Environmentalists complain the new regulations have too many loopholes, while the energy industry frets they will create more hoops to jump through before it can hire people to extract the oil or gas from the ground.

“There is so much energy in the ground that we can access, that it’s coming into more people’s backyards than ever before,” said Julia Bell, a spokesperson for the Independent Petroleum Association of America. “The tension is popping up everywhere.”

Colorado is one of many that has dealt with the explosion in energy extraction that analysts say may enable the United States to overtake Saudi Arabia as the world’s top energy producer in a decade.

The same boom has brought drilling rigs, and the fears of air and water pollution that accompany them, into densely-populated urban areas.

Innovations like hydraulic fracturing, known as “fracking,” have made it easier to extract oil and especially natural gas from energy-rich geological formations such as the Niobrara shale, which stretches from Wyoming to beneath the densely-populated Front Range of Colorado’s Rocky Mountains.

Last year, more than 150 bills were introduced in 25 states to regulate energy drilling, said Jacquelyn Pless, an analyst at the National Conference of State Legislatures. Only 14 became law, many to define whether state or local governments could regulate the procedure.

In the Denver suburb of Longmont, residents passed a ballot initiative in November banning hydraulic fracking.

An industry group has filed a lawsuit to overturn the ban, arguing only the state can regulate energy exploration. There is a similar challenge over Longmont’s own drilling regulations, which are more stringent than even the state’s new ones.

Other cities have already embarked on similar paths.

The university town of Fort Collins, Colo., gave preliminary approval to its own fracking ban.

Pittsburgh, the cradle of the American energy industry in the 19th century, banned new drilling projects within city limits in 2010, but the state is challenging the authority of cities to issue such bans.

California, where cities like Los Angeles are pockmarked with old oil wells, is drawing up new fracking regulations, while New York state has a moratorium on fracking as the government revises its regulations.

In Texas, the Fort Worth suburb of Southlake banned fracking during the hot summer months because it drains the town’s water supply. In Dallas, the city council has been battling over whether to approve drilling in city parks.

“We understand the necessity of drilling for oil and gas,” said Marc McCord, an activist who has fought against energy extraction in Dallas. “But drilling in a densely-populated urban area is about as insane as anything on the face of the earth.”

In Colorado, drilling traditionally focused on the western side of the Rockies or on the Eastern Plains. But wells have inched into Front Range communities, where 90 percent of the state’s population resides.

“People are saying `we thought we bought our house in suburbia, or at least exurbia, and now someone is drilling an oil well here,” said Colorado Oil and Gas Conservation Commission director Matt Lepore.

The commission had required drilling operators to disclose to the state what chemicals they are injecting into the ground during fracking.

In a nod to the reality of rigs inching closer to homes, the commission earlier this month passed new rules that apply somewhat different standards to urban and rural areas.

In both settings, they require 500 feet between occupied buildings and energy wells, 1,000 feet for schools and hospitals – though the distance requirement can be waived by property owners where drills are to be dug.

The difference between urban and rural settings comes in how easily the rules can be waived. In urban areas, adjacent landowners have to agree to the waiver, while in rural ones it can be done unilaterally. In either zone, the drilling company can also ask the government for a waiver.

The rules replace earlier limits of 150 feet in rural areas and 350 feet in urban ones. Energy operators also must meet with homeowners and others who live within 1,000 feet of their proposed projects to listen to their concerns, not use open pits to store drilling waste and ensure their venting system is closed to prevent sending methane into the air.

“That package easily makes it the most protective of any state I’m aware of,” Lepore said. “We’ve got 50,000 wells and 100-plus year history of production.”

Environmentalists note that a couple of other states—Maryland, which has little energy extraction, and energy-rich West Virginia – require a greater distance between residences and rigs.

“Three years ago, this would have been really bold,” said Earthworks’ Baizel. “But the drilling’s gotten so intense; I’m not sure it’s that bold.”

The energy industry sees the regulations as too inflexible.

“This rule goes too far by ultimately impacting the farmer, the rancher, mineral rights owner, business owner and home developers,” Tisha Schuller, president of the Colorado Oil and Gas Association, an industry group, said in a prepared statement. Critics note it hampers the building of new housing near energy fields. The energy industry had sought smaller setbacks that it said would be less cumbersome.

“This is a huge benefit to our country,” the IPAA’s Bell said, “and not something we should be scared of.”