WASHINGTON — The U.S. Supreme Court on Tuesday upheld a federal regulation requiring some states to limit pollution that contributes to unhealthy air in neighboring states, reversing a lower court ruling and handing a victory to President Barack Obama.

By a 6-2 vote, the court said the U.S. Environmental Protection Agency acted reasonably in requiring 28 states to reduce emissions from coal-fired power plants of sulfur dioxide and nitrogen oxides, which can lead to soot and smog.

“This court decision is a resounding victory for clean air and public health, especially for everyone who lives in Maine,” said Glen Brand, director of the Sierra Club Maine Chapter. “As the ‘tailpipe of the nation,’ Maine suffers from downwind toxic air pollution from coal-burning plants and other dirty energy sources. When fully implemented, the Cross-State Air Pollution health standard will help reduce soot and smog, improve air quality and reduce life-threatening respiratory illnesses that affect tens of thousands of Maine families.”

Writing for the majority, Justice Ruth Bader Ginsburg called the EPA rule a cost-effective way to allocate responsibility for emission reductions among so-called upwind states, and that the EPA need not consider each state’s proportionate responsibility for the emissions in question.

She also called the rule a “permissible, workable and equitable interpretation” of the “good neighbor” provision of the federal Clean Air Act.

This provision limits cross-border emissions that make it harder for downwind states to comply with federal air quality standards, or national ambient air quality standards, known as NAAQS.

“The Good Neighbor Provision requires EPA to seek downwind attainment of NAAQS notwithstanding the uncertainties,” Ginsburg wrote. “Required to balance the possibilities of under-control and over-control, EPA must have leeway in fulfilling its statutory mandate.”

Justice Antonin Scalia dissented, joined by Justice Clarence Thomas. Both are conservative appointees of Republican presidents.

Scalia said the majority effectively rewrote the good neighbor provision by filling in a “gap” in the law without support from the text, calling it a “Look Ma, no hands!” approach. He also said the decision deprived states of the opportunity to adopt their own plans to reduce pollution.

Obama has promised to cut U.S. greenhouse gas emissions by 17 percent by 2020 compared with 2005 levels, and has used EPA’s clean air regulations to help achieve that goal.

EPA Administrator Gina McCarthy said the Supreme Court win validated the agency’s broader efforts to protect public health.

“Today’s Supreme Court decision is a resounding victory for public health and a key component of EPA’s efforts to make sure all Americans have clean air to breathe,” McCarthy said in a statement.

She added the decision underscored the agency’s efforts to write rules built on “strong legal foundations and sound science.”

Several major utilities and coal firms, including Southern Company and Peabody Energy were represented in the case by umbrella group the Utility Air Regulatory Group.

The Environmental Defense Fund, one of the interveners in the case representing health and environmental groups, said the decision bolsters the work of the EPA, which regularly comes under attack by industry.

“This is a big affirmation of the common sense actions that the EPA is putting in place in addressing harmful air pollution around our country,” said Vickie Patton, general counsel of the Environmental Defense Fund.

Lawyers representing the industry groups and the Texas Attorney General’s office did not immediately respond to requests for comment.

But pro-coal group the American Coalition for Clean Coal Electricity said the decision upholds what it calls the EPA’s “abuse” of the Clean Air Act.

“EPA continues to abuse the Clean Air Act, imposing overreaching regulations that promise little ‘gain’ with great ‘pain’ for American consumers and the broader American economy,” said Laura Sheehan, vice president of communications for the group.

Chief Justice John Roberts, as well as Justices Anthony Kennedy, Stephen Breyer, Sonia Sotomayor and Elena Kagan joined the majority opinion. The ninth justice, Samuel Alito, recused himself from the case for undisclosed reasons.

In striking down the EPA rule in August 2012, the U.S. Court of Appeals for the District of Columbia Circuit said the agency had exceeded its authority in setting targets for states, and could not act until states had received notice of how much pollution they were emitting.

The Obama administration appealed, and Tuesday’s Supreme Court decision reversed the circuit court ruling.

Other opponents to the rule included Entergy Corp, Energy Future Holdings Corp’s Luminant Holding Co, and the United Mine Workers of America, among others.

The two consolidated cases are EPA v. EME Homer City Generation and American Lung Association v. EME Homer City Generation, U.S. Supreme Court, 12-1182 and 11-1183.