Portland's push to ban new fossil fuel terminals within city limits isn't unconstitutional after all, the Oregon Court of Appeals says.

In a decision that's warmed the hearts of environmental groups, the court today swatted aside conclusions of a state board that helped put Portland's innovative and strict policy on ice. Proponents say that could mean that not only Portland will outlaw new fossil fuel terminals in coming days, but that other port cities might be free to follow suit.

"It's big for Portland and it’s also big for other communities around the country because they can also think about doing this," says Nick Caleb, a staff attorney at the Center for Sustainable Economy, which argued in favor of the ban in court. "They’ve had reservations about starting a process where they’re going to lose on a constitutional issue."

Meanwhile, city attorneys this morning are looking at exactly what the court ruling means, and how to proceed.

But let't back up. In late 2016, Portland City Council passed the strongest strictures on "bulk fossil fuel terminals" in the country. Not only did the new rules prohibit new large terminals (those with a capacity of more than 2 million gallons), they prohibited the city's 11 existing fossil fuel terminals from expanding.

In some ways it was a symbolic step—no one was planning to build a new terminal—but former Mayor Charlie Hales and others argued it sent a strong message about city priorities.

The Portland Business Alliance and others were furious. So the PBA teamed up with the Columbia Pacific Building Trades Council and Western States Petroleum Association to appeal the city's decision to the state's Land Use Board of Appeals (LUBA).

Two of LUBA's commissioners recused themselves, and the remaining commissioner found that Portland's policy was unconstitutional, because it restricted interstate commerce of fossil fuels. LUBA also decided that the policy ran afoul of state planning goals.

Today's decision says LUBA was mostly wrong. In a 31-page opinion [PDF], three appeals judges say that the city's policy does not violate the interstate commerce clause of the constitution, and does not run afoul of state land use planning goals around transportation, as LUBA concluded. However, the court didn't overturn LUBA's finding that Portland's law ran afoul of a state land use planning policy known as Goal 2.

Nevertheless, a host of groups who'd argued in favor of the fossil fuels policy say the ruling is a huge win. In a joint press release, the Audubon Society of Portland, Center for Sustainable Economy, 350PDX, Columbia Riverkeeper, Oregon Physicians for Social Responsibility, and Crag Law Center (which represented all of them in court), said that the city can address the remaining land use violation "through additional procedure and reinstate the Fossil Fuel Terminal Zoning Amendments."

"We’re thrilled," Regna Merritt of Oregon Physicians for Social Responsibility said in the release. "Today’s decision affirms that Portland and other communities can implement innovative protections to counter threats to human health and safety from dangerous fossil fuel infrastructure."

Commissioner Amanda Fritz, who along with Hales championed the fossil fuels regulations, tells the Mercury she's "very pleased with the ruling."

Mayor Ted Wheeler, in a noon statement, called the ruling "a significant victory for the people of Portland."

"I will be working with my Council colleagues, City staff, and the community in the days ahead on next steps," Wheeler said.

But precisely how the city moves forward isn't quite clear. City Attorney Tracy Reeve says the city's currently looking at next steps.