WASHINGTON — A top attorney is out of his job in the embattled Eastern District of Virginia, which sought to prosecute two of Donald Trump’s perceived political enemies before the cases were dismissed, four people familiar with the matter told NBC News Monday.

The move to oust Robert McBride came as the Justice Department continues to say that Trump loyalist Lindsey Halligan is the head of the office. A judge has pushed the administration to explain why they continue to refer to her as such, the people said.

A federal judge determined in November that Halligan was wrongly appointed, and dismissed criminal cases brought by her office against FBI Director James Comey and New York Attorney General Letitia James. Four other appointments of acting U.S. attorneys have also been ruled unlawful.

One of the people said the dispute was about whether McBride would head up any effort to re-indict Comey.

Two of the people told NBC News that McBride had also met quietly with federal judges behind the back of administration officials, in an effort to get appointed acting U.S. attorney by the court. The move to dismiss him was backed by Justice Department leadership, those two people said.

McBride did not immediately respond to a request for comment. A spokesperson for EDVA declined to comment.