A U.S. Justice Department attorney on Thursday spelled out the circumstances under which special counsel Robert Mueller could be fired in a court case that took on new significance this week after President Donald Trump ousted his attorney general.

The case, argued on Mueller's behalf by Deputy Solicitor General Michael Dreeben, who is working temporarily on assignment in Mueller's office, started months ago as a challenge to the legality of Mueller's appointment and his authority.

When Trump ousted Attorney General Jeff Sessions on Wednesday and replaced him with Matthew Whitaker, Democrats in the U.S. Congress immediately warned that Trump might be moving to dismiss Mueller and squash his probe.