HARRISBURG, Pa. (AP) — Gov. Tom Corbett is expected to sign a sweeping bill that could force Pennsylvania's booming natural gas industry to help pay for a wide range of state and local government programs, toughen safety standards and limit the ability of local officials to keep drilling out of their towns.

The state House of Representatives' vote came more than three years after the exploration industry, armed with new technology, descended on Pennsylvania and began pouring billions of dollars into tapping the Marcellus Shale natural gas formation, the nation's largest-known natural gas reservoir.

The 174-page bill was negotiated among Republicans and unveiled Monday. It passed the House on Wednesday, 101-90, and the Senate on Tuesday, 31-19, largely along partisan lines. Only seven Democrats voted for it, while 13 Republicans voted against it.

Pennsylvania is the largest natural-gas producing state that doesn't impose some type of levy on the activity. Still, Democrats complained bitterly that the bill asks the industry to pay a meager price for extracting a valuable natural resource while it strips municipal officials of the kind of authority to control drilling that even towns in Texas enjoy.

Republicans insisted the bill strikes a careful balance between cultivating an enormous economic boost and protecting the environment, and that Pennsylvanians cannot wait any longer to update decades-old laws that never envisioned such deep, widespread drilling that generates huge volumes of often-toxic wastewater.

"This legislation reaffirms our strong commitment to safe and responsible natural gas development here in Pennsylvania," Corbett said in a statement shortly after the House vote.

Corbett, a Republican, did not say when he will sign the bill, but as soon as he does, about 35 counties will have 60 days to decide whether to impose a 15-year fee on their local wells. The first payment for Marcellus Shale wells drilled before this year would be due Sept. 1.

For counties that do not impose the fee, a critical mass of municipalities would have another 60 days to impose it countywide.

Because Corbett opposes the kind of tax on the industry that many other states impose, Republican legislative leaders instead pursued an "impact fee" that he views as being fundamentally different than a tax. Even so, several conservative groups, along with Democrats, insisted that the fee is really a tax.

The fee would rise and fall with the price of natural gas and inflation and would be roughly equivalent to a 3 percent tax rate, Republicans said. Democrats countered that it would reflect a 1 percent tax rate. Either way, it would net less money than many other natural-gas producing states.

"We've heard that this is the best we can do," Rep. Michael Sturla, D-Lancaster, said during nearly four hours of floor debate Wednesday. "Well, no, it's not. If this is the best you can do, then you haven't tried very hard."

Assuming local governments decide to impose the fee, the bill would raise $180 million in the first year, and the total amount would rise in ensuing years as more wells are drilled, tallying more than $1 billion over the first five years, according to Republicans.

About 5,000 Marcellus Shale wells have been drilled since the beginning of 2005, according to the Department of Environmental Protection, in an arc stretching from southwestern Pennsylvania's coal and steel regions north and east through large stretches of state-owned forests to its agricultural northern tier.

Environmental groups were split over the bill, and the industry has been largely silent on it. Local government groups supported it while one exploration company, Fort Worth, Texas-based Range Resources Corp., one the most active Marcellus Shale drillers, said it would provide strong, more predictable regulations that are nevertheless more costly.

"Either you are for a commonsense, balanced approach to the development of the natural gas discovery, or you are just always (saying) 'no,'" House Majority Leader Mike Turzai, R-Allegheny, said during floor debate. "You don't get to have it both ways."

Money from the fee would aid state agencies tasked with regulating the industry, communities that are home to the drilling and statewide environmental improvement programs.

Dollars also would flow to improve bridges and water and sewer plants, purchase natural gas-powered fleet vehicles, build affordable housing and help the development of a massive petrochemical refinery in southwestern Pennsylvania and the reuse of three Philadelphia-area oil refineries that are shutting down.

Corbett and the industry had sought provisions to prevent the ability of municipalities to regulate any drilling activity, but such a provision couldn't pass either chamber. Instead, the bill would require municipalities to allow drilling in all zones, including residential, and require them to follow state spacing requirements. But it also would allow them to apply zoning standards on things like lighting, noise and structures that are used for other industrial activities.

Rep. Scott Conklin, D-Centre, called the provisions tantamount to "corporate eminent domain."

"We don't need big brother coming in here and telling us how to live our lives," Conklin added.

The bill would increase penalties on violators and the required distances between drilling activities and homes, schools, streams and public water sources such as reservoirs, but not to the extent sought by Democrats.

It would require inspections of well sites for erosion and sediment controls before drilling starts, and operators of natural gas facilities, such as wells, waste pits, processors and compressors, would have to submit a report quantifying any air pollution at the site.

It also would strengthen disclosure requirements for chemicals used in the hydraulic fracturing process, although state regulators could keep confidential portions of the disclosures that the companies deemed to be proprietary.