A federal appeals court on Monday threw out the Justice Department's attempt to compel California election officials to set aside thousands of ballots that the Trump administration says may have been cast by noncitizens.

The U.S. Court of Appeals for the 9th Circuit ruled 2-1 that it had no jurisdiction over the appeal. It granted a motion to dismiss filed by Los Angeles County's top elections official. Judges Mark Bennett and Gabriel Sanchez said the federal government had not given a district court an "adequate opportunity" to weigh its request for temporary relief. Judge Patrick Bumatay dissented.

The majority criticized the timing of the department's actions. It filed its lawsuit less than three weeks before the Nov. 3 midterm elections and asked the district court for a temporary restraining order only last week, when California was already processing ballots. "The United States's claimed emergency, at least in part, is a self-constructed one," the court wrote in an unsigned opinion. It cited the government's delay in filing suit, in recognizing that California state law governs ballot issuance and processing, and in telling the court what relief it wanted.

Bennett, appointed by President Trump, and Sanchez, appointed by former President Joe Biden, each wrote a concurring opinion. Bennett said that even if the court had reached the merits, he would have rejected the bid to make California set aside ballots possibly cast by ineligible voters. Bumatay, also a Trump appointee, argued the federal government has a "sovereign interest in safeguarding federal elections" and must be able to act against a potential attack on their integrity.

Gov. Gavin Newsom called the ruling a "positive development and a welcome speed bump to Trump's disgusting attacks on the Constitution and our country's democracy."

The dispute began when Acting Deputy Attorney General Trent McCotter gave California's secretary of state and Los Angeles County registrar Dean Logan 48 hours to review a list of more than 20,000 registered voters the administration considers "likely" noncitizens who were sent mail ballots. In an Oct. 15 letter, the county said the list included addresses statewide and did not explain how it was compiled or how the county should confirm citizenship. The Justice Department sued the same day. Judge David O. Carter scheduled a hearing, but the department filed an appeal with the 9th Circuit, arguing his "silence" amounted to a "constructive denial." The panel heard rare Sunday arguments, where at least two judges seemed skeptical.

Both federal and California law bar noncitizens from voting. The Department of Homeland Security has not told California officials how it identified the voters. In its lawsuit, the Justice Department said DHS compares voter rolls with internal data, uses third-party software, and draws on Social Security Administration records. California officials noted the suit does not allege that those voters will actually vote unlawfully, and Logan's lawyers said the relief sought exceeds executive authority under the Constitution's Elections Clause, which lets states set the "times, places and manners" of congressional elections unless Congress steps in.

Los Angeles County reviewed the list's 7,035 records with county addresses. In a sample of 200, 112 matched canceled or inactive registrations, so no ballot was mailed. Most of the sampled people had never voted, and more than one-quarter listed a U.S. birthplace, according to a county election official. The county has already processed an estimated 550,000 mail ballots.

Federal prosecutors also sent lists of alleged noncitizen registrants to at least 18 other California county registrars on Friday, demanding they set aside those ballots. The Justice Department could ask the full 9th Circuit to reconsider, and the panel gave it until 7 p.m. local time to do so.