Twenty-five years in the making, a new nationwide rule is set to take effect this spring that will sharply restrict coal and oil-fired power plants from releasing mercury, arsenic and other hazardous pollutants into the air and, eventually, into rivers and lakes.

But the rule faces a final and formidable hurdle when the U.S. Supreme Court hears arguments Wednesday from lawyers for the coal and power industries, who say it may be “the most costly rule” ever adopted under the Clean Air Act.

They will be joined by lawyers for Michigan and 19 other Republican-led states, who call the rule on mercury and other air pollutants a regulatory “overreach” by the Obama administration and the Environmental Protection Agency.

The combined case of Michigan vs. EPA poses yet another test of whether the conservative-leaning high court will defer to far-reaching regulations issued by the Obama administration.

Since the Reagan era of the 1980s, the high court has said judges should uphold regulations so long as they reflect a reasonable interpretation of the law. But the court’s conservatives have been increasingly skeptical of President Barack Obama’s regulations.

Last month, the justices sounded closely split on whether to uphold a 2012 tax regulation issued under the Affordable Care Act that allows government subsidies to be paid to enrollees in every state, and not just in the dozen or so that run their own insurance exchanges.

If the court rejects that regulation, it could badly undercut Obama’s health care law and cut off subsidies for millions of low- and middle-income Americans.

The court may face a similar decision in the months ahead on whether to uphold Obama’s executive action on immigration. The action would offer work permits and a shield from deportation to several million immigrants who live in the country illegally. A federal judge in Texas has temporarily blocked it, saying the president overstepped his regulatory authority.

Supporters of the new toxics rule say it is vital to ensuring public health. Mercury is highly toxic and builds up in the food chain. It is particularly dangerous for pregnant women and developing fetuses. Other newly restricted pollutants are believed to trigger asthma attacks and are blamed for several thousand early deaths each year.

Michigan Attorney General Bill Schuette said the rule would “result in rate increases for citizens across the country and threatens the reliability of the electricity grid by forcing the closure of many power plants.”

Environmental lawyers were surprised when the court agreed to hear the industry challenge to the EPA’s mercury rule, which was adopted in 2012 and upheld last year by the U.S. Court of Appeals in Washington.

“It was very hard to understand why they are hearing this,” said Jim Pew, a lawyer for Earthjustice, a nonprofit environmental law firm based in San Francisco. “I don’t think it’s a close case.” He thinks the EPA has shown the restrictions are badly needed.

Congress passed the Clean Air Act in 1970, but lawmakers later became troubled by the slow pace of removing hazardous pollutants from the air. In 1990, they amended the law and told the EPA to study more than 180 toxic substances, including mercury, arsenic and several acid gases. If these substances were shown to harm human health and could be removed from the air, the law said, then the EPA “shall regulate” major sources of these pollutants where it is “appropriate and necessary.”

After a lengthy study, the EPA in the final year of the Clinton administration said new regulation of the coal and oil-fired power plants was appropriate because they were the largest source by far of mercury and other hazardous pollutants.

But in 2005, the EPA under the George W. Bush administration backed off and said power plants could escape strict regulation if pollution were reduced through other means.

Several downwind states sued, and an appeals court ruled in 2008 that the EPA’s retreat violated the law.

That ruling put the matter in the hands of the incoming Obama administration. The EPA proposed new power plant regulations in 2011. They are to take full effect next month, although some power plants have been granted an extension to comply.

The rule sets emissions standards for about 600 electric power plants across the nation. The new standards will force about a 90 percent reduction in emissions of mercury and other toxic metals and gases.

Although nearly every state is affected, the rule will hit hardest in states of the upper Midwest and the South, which rely heavily on coal to produce electricity.

In their appeal, lawyers for the coal industry and the Republican states say the EPA ignored the $10 billion-a-year compliance cost, which would include refurbishing or closing old power plants. Supporters of the rule estimate that it will create more than $37 billion a year in savings when considering the cost of early deaths and lost work days because of asthma.

Meanwhile, attorneys for 17 states, mostly led by Democrats, and several cities joined in support of the EPA.

They include California and New York, as well as Chicago and Baltimore. They said their states have regulated power plants, but their residents are still exposed to mercury and other toxic substances from the air and water.

Environmentalists are dismayed that the mercury rule has become caught up in the partisan divide.

“Clean air is a core American value - in red, purple and blue states,” said Vickie Patton, a lawyer for the Environmental Defense Fund in Colorado. “These protections should have been put in place years ago.”