A federal judge moved Thursday to block California from enforcing its first-in-the-nation mandate for cleaner, low-carbon fuels, saying the rules favor biofuels produced in the state.

The lawsuit challenging the state regulations, which were adopted as part of the state's landmark 2006 global warming law, was filed in federal court last year by a coalition including the National Petrochemical & Refiners Association and the Consumer Energy Alliance.

Fresno-based U.S. District Court Judge Lawrence O'Neill's written ruling Thursday said the low-carbon fuel rules violated the U.S. Constitution's commerce clause by discriminating against crude oil and biofuels producers located outside California.

Out-of-state fuels producers hailed the decision as a win for California drivers.

"Today's decision ... struck down a misguided policy that would have resulted in even higher fuel costs for Californian consumers while increasing the cost of business throughout the state," said Consumer Energy Alliance Executive Vice President Michael Whatley.

The board plans to ask a judge to stay the ruling, and appeal if necessary to the San Francisco-based 9th U.S. Circuit Court of Appeals, spokesman Dave Clegern said Thursday.

The rule is "an evenhanded standard that encourages the use of cleaner low carbon fuels by regulating fuel-providers in California," Clegern said, adding that it "does not discriminate against any fuels on the basis of geography."

The nonprofit legal organization Earthjustice, which was not party to the suit but works on climate-related issues, said the ruling was a major setback for the state's aggressive greenhouse gas emission regulations.

"California is leading the way on cleaner fuels and a cleaner power grid, and the state's programs are consistent with federal law," Earthjustice President Trip Van Noppen said. "It is not surprising that the oil industry is attacking these programs, but like previous attacks in the courts and at the ballot box, we expect this one ultimately to fail."