A former US attorney in Washington state is suing the Trump administration for firing him less than one hour after a panel of federal judges unanimously voted to appoint him to the role.

The lawsuit is the first of its kind as the administration continues a longstanding struggle to nominate and confirm President Donald Trump’s picks for lead prosecutors across the country; exerting tight control over the federal justice system.

Roger Rogoff, a former judge and longtime prosecutor, was selected by the federal judges as the state’s top prosecutor for the Western District last week, only to be fired less than an hour later.

In his lawsuit filed Tuesday, Rogoff said the law clearly stated federal judges are allowed to select US attorneys until the role has been filled by a Senate-confirmed nominee.

“But no person has yet been nominated, let alone confirmed, to fill the vacancy,” his lawsuit states.