SALT LAKE CITY (AP) — As a dirty layer of winter air hovered over the city Wednesday, a coalition of environmental groups asked the Utah Supreme Court to reverse the state's decision to expand operations at an oil refinery that they say will contribute to some of the worst air quality in the nation.

A lawyer for a coalition of environmental groups argued that the state should require stricter emission controls being used at other refineries around the country thanks to technological advances.

"We're stuck with 2006 emissions limits today when technology should be improving," said Joro Walker, senior attorney for Western Resource Advocates in Utah. "Emission limits should be reduced."

Attorneys for the state and Tesoro oil refinery defended the 2012 ruling by regulators to approve the company's plan to increase processing of crude oil at the facility just north of Salt Lake City.

"You have a fully supported decision," said Tesoro attorney Michael Zody. "We have a very sound and defensible position."

The legal battle is the latest illustration of the intense scrutiny air quality issues receive in the greater Salt Lake region.

The hearing came during this winter's first inversion, a phenomenon in Utah's urban corridor caused by weather and geography. Cold, stagnant air settles in the bowl-shaped mountain basins, trapping tailpipe and other emissions that have no way of escaping to create a brown, murky haze the engulfs the metro area.

Doctors warn that breathing the polluted air can cause lung problems and other health concerns. State officials ban wood burning on many days, and they constantly plead with residents to carpool and take other measures to cut down on pollution.

The issue of whether the refinery expansion would harm Utah's air quality took a back seat during the hearing as justices spent most of the time addressing a legal question about the environmental group's court filings.

Justice Thomas R. Lee, the brother Utah Sen. Mike Lee, suggested the environmental coalition made a legal error in challenging the permitting decision, not the agency's final ruling. He likened it to lawyers challenging a case that's been ruled on by an appeals court, but only mentioning the lower court decision.

That's the same argument made by attorneys for Tesoro in court briefings and reiterated during the hearing.

"They should come here and point out what they take issue with in the final order," said Zody.

Walker countered that the final decision was simply an approval of the reasons laid out in the permitting decision. Justice Christine M. Durham seemed to back Walker, suggesting that the final ruling essentially echoed the one mentioned by the environmental groups.

After the hearing, Walker acknowledged it is important legal issue that the justices are clearly concerned about, but said it has nothing to do with the heart of the case.

"It doesn't make the director's decision a valid one," Walker said. Zody declined further comment outside court.

The justices offered no timeline for a decision.

From 2012-2014, Salt Lake City averaged 43 micrograms of soot per cubic meter, exceeding the federal clean-air limit of 35, said Bo Call, manager of the Air Quality division of the Utah Department of Environmental Quality.

Because of those unsafe pollutions levels, Utah is in line to get downgraded next year to a more serious air quality designation by the Environmental Protection Agency, Walker said. That would mean the state will need to come up with even stricter regulations, she said.

Utah state legislators and officials are actively working on the problem. The state passed 22 new rules last year to reduce polluting emissions, including a ban on the sale of aerosol deodorants and hair sprays that contain hydrocarbon propellants.

Tim Wagner, of Utah Physicians for a Healthy Environment, said after the hearing that the issue is of utmost importance. His organization is one of three that brought the legal challenge.

"Air quality is really the number one concern for most of Utahns these days," Wagner said. "Instead of addressing the problem, we're making it worse."