An order by the chief judge of the Montana federal court on Friday not only ousted William Perry Pendley as the top official at the Bureau of Land Management but might also invalidate a wide range of decisions he took to open up vast parts of the American west to oil and gas drilling.

Pendley has been effectively serving as BLM’s acting director even though President Trump never sent his name to the Senate for confirmation, Judge Brian Morris said in his order. The judge gave the Interior Department and the plaintiffs in the case 10 days to submit examples of actions Pendley took that might be set aside.

Morris’s order could also call into question decisions made by officials in similar positions across the administration, which has not nominated people to fill 133 of the more than 750 key positions that require Senate confirmation. Many of the people carrying out those responsibilities may now be challenged for doing so in violation of a law about filling federal vacancies.

“We’re talking here about an acting official or someone designated to be the equivalent who may have no authority to make decisions,” said Max Stier, president of the Partnership for Public Service. “It creates uncertainty across the board and there are many other instances where the same or similar circumstances might exist.”

The court case has also stirred up the already close political campaign to fill Montana’s Senate seat. Democratic Gov. Steve Bullock, who filed the lawsuit that led to Friday’s court order, is running against incumbent Republican Steve Daines.

The BLM manages 27 million acres in Montana, nearly one-third of the state. In his lawsuit, Bullock sought to protect two vast swaths of land in the southwest part of the state — the Lewistown and Missoula areas. Pendley had signed resource management plans for both of them; the one for Lewistown would have opened up 95 percent of the 650,000-acre area to leases for oil and natural gas drilling. Judge Morris said that by analyzing comments and protests about resource management plans Pendley “actually exercised powers reserved to the BLM director.”

“This ruling enshrines in law what Montanans already knew: William Perry Pendley has no business overseeing our public lands,” Sen. Jon Tester (D-Mont.) said in a statement. “Montanans and future generations will benefit from Governor Bullock’s work protecting our public lands from Pendley’s reckless agenda.”

While the Federal Vacancies Reform Act limits a person to serve in an acting capacity for 210 days, Pendley had been serving for 424 days. And the Interior Secretary David Bernhardt had extended Pendley’s tenure four times, the court noted.

“The President cannot shelter unconstitutional ‘temporary’ appointments for the duration of his presidency through a matryoshka doll of delegated authorities,” Morris said, referring to the popular Russian nesting dolls.

“If this case becomes a template in other districts, then it would follow that all other land use plans that have been approved during Pendley’s illegal tenure could also get thrown out,” said Aaron Weiss, deputy director of the Center for Western Priorities. “The potential implication there is stunning — effectively erasing all of the planning work BLM has finalized over the last year, possibly longer.”

He said in an email that resource management plans were “the products of YEARS of work and designed to stay in place for 20 year spans, and lay out where oil and gas companies can expect to drill down the road. They also affect grazing, mining, and recreation.”

Collin O’Mara, president of the National Wildlife Federation, said the Montana ruling would encourage his organization and other environmental groups to reexamine BLM decisions that might have been signed by Pendley, a longtime critic of federal land management before joining Interior.

BLM drew up similar resource management plans for a portion of Bears Ears National Monument in Utah, O’Mara said. (A separate, larger portion of Bears Ears was covered by Trump’s executive order.) He said a reexamination of BLM policies could also affect an oil and gas lease sale in Chaco Canyon in New Mexico.

O’Mara said groups would also seek to learn whether Pendley signed documents regarding moving most of the BLM from Washington, D.C., to Grand Junction, Colo.

“This puts a question mark over every decision he has made,” said Tracy Stone-Manning, associate vice president for public lands at the NWF. “And that’s the price the administration pays for not going through the normal process of nominating a director and having that approved by the Senate.”

Weiss said another policy that might be reviewed was the update of the sage grouse plan from March 2019. Pendley wasn’t acting director at that point, but the people who were carrying out the duties of BLM director were Brian Steed and Casey Hammond, who both exercised duties past the window allowed in the Vacancies Reform Act.

“In that case, the legal challenges are coming from conservation groups, not governors,” Weiss said. “But this could add another legal argument that the conservation groups use to get the plans permanently thrown out.”

Pendley has been a lightning rod ever since his appointment to the BLM. In 1982, while Pendley was head of the Minerals Management Service, he and another Interior official, along with their wives, attended a dinner with two coal company attorneys on the same day Pendley and his colleague had made a favorable decision regarding bids on Powder River Basin coal leases, as outlined in a General Accounting Office report. The coal company officials picked up the entire $494.45 dinner tab, or $1,343 in today’s dollars.

Pendley, who had moved from Interior to the Department of the Navy, resigned the year after the GAO’s findings became public.

He later became president of the Mountain States Legal Foundation, founded in 1977 and initially run by Reagan’s controversial first Interior secretary, James G. Watt. The foundation received backing from ultraconservative groups and individuals such as the Koch-linked Donors Trust and beer tycoon Joseph Coors.

Pendley was later counsel of record representing aging businessman Sidney Longwell and his small company, Solenex. Solenex leased 6,247 acres in northwestern Montana in 1982 during the Reagan administration for about $1 an acre. Long­well wanted permission to build a six-mile service road and bridge over the Two Medicine River on lands considered sacred by the Blackfeet tribe. The dispute lasted decades.

Pendley also wrote opinion pieces. “The Founding Fathers intended all lands owned by the federal government to be sold,” he wrote in a National Review magazine article in 2016.