A couple judicial rulings recently actually went against corporate America in favor of consumers and residents, in such a rare fashion that I feel compelled to report on it.

First, in Pennsylvania a state appellate court delivered what may be one of the first rulings against expanded hydraulic fracturing in a state with plenty of natural gas reserves in the Marcellus Shale region.

A Pennsylvania appellate court panel on Thursday struck down provisions in a new law regulating the state’s booming natural gas industry that opponents said would leave municipalities defenseless to protect homeowners, parks and schools from being surrounded by drilling sites or waste pits. The decision was a defeat for Gov. Tom Corbett and the natural gas industry, which had long sought the limitations, and a prompt appeal to the state Supreme Court was expected.

The state Commonwealth Court ruled 4-3 in a decision released Thursday that the limitations in the so-called Act 13 violated the state constitution. The opinion’s author, President Judge Dan Pellegrini, said the provisions upended the municipal zoning rules that had previously been followed by other property owners, unfairly exposing them to harm.

Seven municipalities had sued over the sweeping, 5-month-old law, saying it unconstitutionally takes away the power to control property from towns and landowners for the benefit of the oil and gas industry.

So local governments now have a restored voice in fracking regulation in Pennsylvania. Two Republican appointees voted with two Democratic appointees on the decision.

In a federal ruling, the “pay-for-delay” system, where drug manufacturers pay off generic drugmakers to get them to stop making generic versions of top sellers, took a significant hit earlier this month. This case is destined for the Supreme Court:

On July 16, a federal appeals court in Philadelphia issued a decision that the arrangement is anticompetitive on its face. It potentially sets up a confrontation before the United States Supreme Court. If it were to accept the case, the outcome could profoundly affect drug prices and health care costs.

The Philadelphia ruling by the Third Circuit Court of Appeals conflicted with decisions from at least three other federal circuit courts, giving the Supreme Court a strong reason to hear the case within the next few years.

“The Third Circuit has rebalanced the issue and teed it up for the Supreme Court,” said Eleanor M. Fox, an antitrust expert and professor at the New York University Law School. The agreements between generic and branded drug manufacturers “are cases of competitor collaboration, which the Supreme Court has called ‘the supreme evil of antitrust.’ ”

The stakes are enormous for brand-name drug makers, which would face lower profits, and for pharmacies, insurance companies and patients, who could benefit from the savings.

Of course, this has to get by the corporate-friendly Supremes, so don’t hold your breath. But there would be significant savings derived from outlawing pay-for-delay. The Congressional Budget Office estimated last year that drug costs would go down by $11 billion in the US in that event.

Who knows how it will play out, but for now, people are getting an unusual leg up over corporations in the courts in a couple respects.