HARRISBURG - Call it the mystery moratorium.

Just over a week ago, a ban on drilling for natural gas in a little-known rock formation under Bucks and Montgomery counties made its way into Pennsylvania law.

It did so in a way the state's oft-maligned legislators had pledged to avoid: at the last minute, with no hearings and little substantive debate as lawmakers rushed to send Gov. Corbett the annual budget on time. What debate there was stretched nearly to midnight in a chamber that had vowed not to do the public's business after 11 p.m.

How the measure came about, who benefits, and whether it was even necessary are questions at the heart of an argument that lingers in the Capitol even as legislators have scattered for their summer break.

The moratorium's chief backer, Sen. Charles McIlhinney (R., Bucks), says it was necessary in light of a new scientific study on the potential natural gas locked in the so-called South Newark Basin, which underlies parts of Montgomery, Bucks, Chester, and Berks Counties. "We need to find out where it is and how much is there before drilling," McIlhinney said.

The moratorium's critics blame science, too - political science.

They contend McIlhinney and other Bucks County legislators carved out a special status for their home turf to pacify angry constituents in case drillers come calling with their rigs. This while other locales across the state with real drilling concerns have to abide by Pennsylvania's new law, known as Act 13, which impose fees on drillers in the gas-rich Marcellus Shale but takes away local zoning controls over drilling.

"What makes Bucks and Montgomery so special?" asked State Rep. Jesse White (D., Washington), whose southwestern district is dotted with drilling rigs.

Even the Corbett administration, which signed off on the moratorium, acknowledged there was little immediate need for it. Patrick Henderson, Corbett's energy executive, said the vast gas reserves in the Marcellus Shale, along with the infrastructure already in place in Western Pennsylvania, makes drilling there much more attractive for the time being.

Henderson, principal architect of the administration's energy policies, told The Inquirer last week, "I don't think anyone is falling over themselves to develop the South Newark Basin over the Marcellus Shale."

South Newark what?

Most legislators first heard about the moratorium language - and the South Newark Basin, for that matter - when they were knee-deep in negotiations with Corbett and his aides over the $27.65 billion budget, as well as the related bills needed to deliver an annual budget on time.

One of those bills, the fiscal code, gives detailed guidance on how state dollars are to be spent. Every year, legislators make myriad changes in it to reflect new needs; this year, the changes alone took up 56 pages.

It was in there that the moratorium language, seven paragraphs in all, was tucked.

Those paragraphs said the state can't issue drilling permits for the South Newark Basin until 2018, or until the state Department of Conservation and Natural Resources completes an impact study; and until the legislature lays out provisions for a local-impact fee.

McIlhinney contends that swift action on the measure was needed because a study by the U.S. Geological Survey, released in late June, detailed the area's drilling potential for the first time. The study estimated that the South Newark Basin may contain 876 billion cubic feet of natural gas.

While that is a fraction of the estimated 141 trillion cubic feet of gas contained in the Marcellus Shale, the moratorium's defenders see the possibility of a new drilling frontier, exposing their heavily suburban counties to a rush of rigs in a few years.

Even before the study, McIlhinney and Senate GOP leaders said, a moratorium had been in the works. He said he announced his intentions in April at a constituents' forum in Bucks County.

"This had been weeks in development, if not months," said Drew Crompton, counsel and chief of staff to Senate President Pro Tempore Joe Scarnati (R., Jefferson). "We were talking about this issue because there was a unique set of circumstances in the southeast."

Those circumstances have to do with Act 13, otherwise known as the Marcellus Shale law, enacted in February with strong Republican support. It allows counties hosting natural gas wells to decide whether to impose a fee on drillers - but also limits municipalities' ability to use zoning or other rules to limit where drillers can drill.

There was angst over Act 13's zoning language at both ends of the state. Two Bucks County municipalities, Nockamixon and Yardley Borough, have joined in a suit with Pittsburgh-area communities challenging that part of the law.

People in Bucks were still fuming at the April meeting where McIlhinney said he announced his intentions for a moratorium. Things got so loud that he and other elected officials there could barely get a word in.

Some in the crowd felt they had been sold a bill of goods - that they had been assured Act 13 wouldn't apply to their communities. According to news reports of the meeting, McIlhinney, too, said he had believed that when he voted for Act 13. He promised to get the law amended so that it wouldn't apply outside Marcellus Shale areas.

Defending the moratorium to Senate colleagues late last month, McIlhinney reiterated that he had been unaware of Act 13's reach.

Democrats exploded.

"People knew full well what the heck they were voting on," raged Sen. Jim Ferlo (D., Allegheny). ". . . The fact of the matter is it became a political hot potato for a couple of colleagues from a couple of counties. Now they're coming here with their tail between their legs and seeking some relief."

The moratorium's route into law was controversial in its own right. Remember the 11 p.m. cutoff for legislative debate? That rule was enacted after public fury over legislators' 2005 wee-hours vote to raise their own pay. But rules can be overridden - and that's what state senators did on the night of June 30.

Even as Corbett and others were gathering in the Capitol Rotunda at 11:45 p.m. to sign the main budget bill, the sound of debate on the fiscal code - moratorium and all - could be heard from the Senate chamber up a marble staircase.

Some lawmakers gripe that the process went against promises the legislature had made to clean up its way of doing business: no last-minute deals; no debate deep into the night; no measures passed without thorough deliberation. White called it the "Bucks backroom deal."

Two moratoriums

Notwithstanding the political back-and-forth, it's not clear just how much the moratorium will affect future drilling in the area. Bucks and Montgomery Counties are already protected by a separate moratorium - put in place in 2009 by the Delaware River Basin Commission, the interstate agency that oversees water issues in the river basin.

And only one driller, Butler-based Turm Oil, is now seeking a permit to drill in the South Newark Basin, said Kevin Sunday, spokesman for the state Department of Environmental Protection. By comparison, thousands of wells have been drilled in the Marcellus Shale formation.

For his part, McIlhinney says there's no guarantee that the Delaware River Basin Commission's moratorium will endure. He said elected officials must stand up for constituents. "If they [legislators] did something that benefited their constituents, that's their job," McIlhinney said. "And good for them."

Contact Angela Couloumbis at 717-787-5934 or acouloumbis@phillynews.com, or follow on Twitter @AngelasInk.