(Bloomberg) -- A federal judge blocked former White House Press Secretary Sean Spicer and ex-Office of Management and Budget Director Russell Vought from returning to the board of the U.S. Naval Academy while they sue President Joe Biden over their ouster from the panel.

U.S. District Judge Dabney Friedrich in Washington denied the motion by Spicer and Vought for a preliminary injunction that would have forced Biden to return them to the board while the lawsuit proceeds. The former Trump administration officials sued in September after they were terminated.

Friedrich, a Trump appointee, rejected the claim that Biden’s removal of Spicer and Vought would “silence dissenting views” on the board, which advises the president on the “state of morale and discipline” at the Naval Academy, as well as its curriculum, physical equipment and fiscal affairs, according to an order filed on Saturday.

Spicer and Vought “give no indication that their views on the governance of the Naval Academy actually differ from the other board members,” the judge wrote. “Nor do they explain how it would serve the public interest to present advice to the president -- the primary function of the board -- that the president does not intend to consider.”

Their lawyer, Reed Darrow Rubinstein with America First Legal Foundation -- a nonprofit set up by former Trump administration officials including Stephen Miller and Mark Meadows -- didn’t immediately return a message seeking comment.

In their complaint, Spicer and Vought argued Biden did not have the legal authority to remove them from the board, citing a provision for three-year terms set by Congress. The judge rejected that view.

“Such term-of-office provisions do not constrain the president’s removal power,” the judge wrote. “To the contrary, they serve only to limit the length of an officeholder’s term.”

Trump advisor Kellyanne Conway was similarly asked to step down from the Air Force Academy’s board of visitors. Biden Press Secretary Jen Psaki said in September that the purge was designed to ensure the board members were qualified and aligned with the administration’s values.

Spicer held Psaki’s job for the first six months of the Trump administration, during which he memorably but falsely boasted that Donald Trump’s swearing-in drew “the largest audience ever to witness an inauguration, period, both in person and around the globe.” He later said he regretted the widely parodied comment.

The case is Spicer v. Biden, 1:21-cv-02493, U.S. District Court for the District of Columbia (Washington).

©2021 Bloomberg L.P.