By Sudhin Thanawala | Associated Press

SAN FRANCISCO — A U.S. judge struck down a California law challenged by the Trump administration that aimed to give the state power to override the sale of federal lands.

The law unconstitutionally regulates the U.S. government and discriminates against people seeking to buy federal public land, Judge William Shubb in Sacramento ruled Thursday.

State lawmakers who passed the law — SB50 — last year cited concerns that the Trump administration would allow more logging, oil drilling or development on some of the 46 million acres owned by the federal government in California.

Gov. Jerry Brown signed the law a year ago, and it went into effect in January. The U.S. Department of Justice filed its lawsuit in April — one of several the administration has filed against California as the state seeks to thwart President Donald Trump’s policies.

California has sued the administration nearly four dozen times, mostly over immigration, the environment and health care.

The California attorney general’s office referred comment on Shubb’s ruling to the State Lands Commission. A message for a spokeswoman for the commission was not immediately returned.

The law sought to give the commission the first right to purchase federal lands or to arrange for a specific buyer and included fines for failing to do so.

The DOJ argued in its lawsuit that California had no power to interfere with federal land sales, citing the Constitution and the 1850 act of Congress that admitted California to the union.

It said the state law was delaying land sales — even for projects that had been in the works for years — and was depressing their value.

“The court’s ruling is a firm rejection of California’s assertion that, by legislation, it could dictate how and when the federal government sells federal land,” Attorney General Jeff Sessions said in a statement. “This was a stunning assertion of constitutional power by California, and it was properly and promptly dismissed by the district judge.”

Shubb rejected the state’s argument that the law regulated land buyers, not the federal government.

The law “trespasses on the federal government’s ability to convey land to whomever it wants,” the judge said.

It also singles out people who do business with the federal government, Shubb said, subjecting them to a “level of uncertainty and potential delay that all others are spared from.”