LOS ANGELES — A federal judge has ruled that Bill Essayli, the Trump administration’s choice to lead federal prosecutions in Los Angeles, is unlawfully serving as the district’s top prosecutor.

U.S. District Judge J. Michael Seabright found that the appointment arrangements did not comply with federal law governing temporary U.S. attorney positions and the process for appointing permanent prosecutors.

Federal law limits acting U.S. attorneys to 120 days and generally requires Senate confirmation for permanent appointments. The judge concluded that subsequent administrative designations had not resolved the legal issues surrounding Essayli’s continued service.

The decision marks another legal challenge to the administration’s use of interim federal prosecutors. Essayli rejected the ruling, arguing that the president and attorney general have authority to select Justice Department supervisors.

The ruling will not take effect immediately. The court must first decide whether to pause the decision while an appeal proceeds.

The case could have broader implications for federal prosecutorial appointments and the administration’s authority to fill senior Justice Department positions without Senate confirmation.

Further legal proceedings are expected as the dispute continues.