President Joe Biden removed Sean Spicer, Donald Trump’s first press secretary, from the advisory board of the Naval Academy in September. Ten additional Trump administration officials were purged from similar roles at other service schools.

Spicer and ex-Office of Management and Budget Director Russell Vought sued Biden to keep their positions.

On Monday, a federal judge rejected their request to stay on the Navy board while the lawsuit is being considered.

U.S. District Judge Dabney Friedrich, a Trump appointee, wrote that Spicer and Vought failed to “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.”

Friedrich also rejected the argument that their dismissal would “silence dissenting views.”

Spicer and Vought were represented by a legal group, America First Legal Foundation, setup by former Trump administration officials, including Stephen Miller and Mark Meadows.

Spicer is a Navy reserve officer.