The U.S. Supreme Court on Monday trimmed the Obama administration’s power to curb greenhouse gases under a long-running air pollution program in a decision that means most major facilities, including power plants and refineries, will continue to be regulated.

On a 7-2 vote, the court rejected an industry-backed argument that most emitting facilities should not be regulated for greenhouse gases under one particular air pollution program of the U.S. Environmental Protection Agency (EPA).

But industry could claim a partial win because the court ruled on a 5-4 vote that some facilities the government had wanted to regulate will be exempted.

“It bears mention that EPA is getting almost everything it wanted in this case,” Justice Antonin Scalia, who wrote the majority opinion, said in a statement he read in court.

The case focused only on the “prevention of serious deterioration” or PSD program, which requires any new or modified major polluting facility to obtain a permit before any new construction is done if it emits “any air pollutant.”

The EPA said in a statement that the Supreme Court “largely upheld” its approach.

“The Supreme Court’s decision is a win for our efforts to reduce carbon pollution because it allows EPA, states and other permitting authorities to continue to require carbon pollution limits in permits for the largest pollution sources,” the agency said.

Industry groups, such as the American Petroleum Institute, also claimed victory. The group said in a statement that the decision was a “stark reminder that the EPA’s power is not unlimited.”

The justices were split in multiple ways in the case. The four liberals voted with Scalia on one point but would have ruled for EPA on all counts. Conservative justices Samuel Alito and Clarence Thomas would have ruled against the government across the board.

According to the American Chemistry Council, one of the challengers, 83 percent of greenhouse gas emissions that could potentially be regulated under the EPA’s interpretation of the law would still be covered as a result of the ruling, compared with the 86 percent of emissions that the EPA had hoped to regulate.

Under the program, the operators have to show they are using the best technology available to reduce emissions of the covered pollutants. More than 300 facilities have already applied for permits.

The Supreme Court decision is not expected to affect the Obama administration’s ability to set air pollution standards for greenhouse gases under a separate provision of the Clean Air Act. On June 2, the White House announced proposed rules calling for 30 percent reduction in greenhouse gas emissions from existing power plants, including coal-fired facilities.

The case is Utility Air Regulatory Group v Environmental Protection Agency et al, U.S. Supreme Court No. 12-1146

(Reporting by Lawrence Hurley; Editing by Howard Goller and Grant McCool)