A federal judge in Montana has ousted President Trump's top public lands official.
The ruling blocks William Perry Pendley from continuing to serve as the temporary head of the Bureau of Land Management, a post he has held for more than a year.
The judge ruled in response to a lawsuit filed by Montana Gov. Steve Bullock who argued it's illegal for Pendley to lead the agency because he had never been confirmed by the Senate.
Bullock is also in a tight race to unseat Montana's Republican Sen. Steve Daines.
A U.S. Department of Interior spokesman called the ruling "outrageous," adding that "we will be appealing this decision immediately."
Trump nominated Pendley to lead the department in June. The bureau manages roughly one-tenth of the land mass of the United States and approves development of vast publicly owned energy resources including oil and gas wells and coal mines.
Following months of pressure by Democrats and some Republicans, Trump withdrew Pendley's nomination in August, but Pendley continued to lead the agency as its deputy director for programs and policy.
Pendley has long been polarizing. Prior to coming to the bureau, he called for the sale or transfer of federal public lands to the states. He also spent much of his career as an attorney challenging the agency he now leads.
"Today's ruling is a win for the Constitution, the rule of law, and our public lands," said Bullock. It's also seen as a boost for his Senate campaign as the potential sale or transfer of federal public lands is a key issue for Montana voters.