RALEIGH, N.C. (AP) — A state Senate panel recommended a framework Tuesday for the state of North Carolina to follow while legalizing a controversial form of natural gas drilling.

A divided Senate Commerce Committee voted in favor of the measure, which would lift a ban on hydraulic fracturing, or fracking. But state permits wouldn't occur for at least another two years while regulations are developed, and the General Assembly would first have to take legislative action to allow the issuance of the permits.

The action came in a standing room-only committee room that was too small to accommodate several dozen people, many of whom had rallied at the Legislative Building to oppose fracking. Opponents able to enter the meeting room made catcalls after the committee approved the measure on a voice vote. A Senate floor vote was scheduled for Wednesday.

The measure would direct several state agencies to devise by a regulatory program by Oct. 1, 2014, to manage oil and gas exploration and development activities, including the horizontal drilling and hydraulic fracturing. One agency involved would be a reformulated state mining commission that would be expanded to include experts in such exploration.

Speakers for and against the bill addressed the legislative committee, including Bill Weatherspoon with the North Carolina Petroleum Council, who praised the bill for its "take-it-slow" approach.

"It makes a lot of sense," Weatherspoon said.

Several Democrats opposed to the bill says the process should go even slower because they argued the environmental risks associated with fracking are so great. Fracking involves injecting a drilled well with chemicals, water and sand to crack shale rock and free trapped natural gas.

Environmentalists and residents in Piedmont counties are worried there aren't enough protections to prevent contaminated drinking water from the process.

"This bill puts the cart before the horse," said Sen. Josh Stein, D-Wake, who asked the bill's sponsors to keep fracking illegal while the rules are being worked out. Any jobs or measurable natural gas may be a decade away, Stein added: "What is the rush?"

The bill was amended last week to include several consumer protections for landowners where drilling may occur that were recommended by the state Department of Justice, but not all of them were added, Attorney General Roy Cooper said. Those left out include requiring well operators to compensate landowners for more damages to their property, as well as giving landowners 30 days to get out of a signed oil or gas lease without penalty.

"Speculators are buying rights to drill now so we need to put strong consumer protections in place as soon as possible," Cooper said in a prepared statement.

Most of the focus on fracking has been on Lee, Moore and Chatham counties. An assistant state geologist recently questioned estimates of a 40-year supply concentrated there as being "wildly optimistic." Weatherspoon said gas exploration in other states often have turned up more supplies that earlier anticipated.

A coalition of environmental and citizen groups brought more than 200 people to Raleigh for a "frack-free North Carolina" lobbying day Tuesday.