This story was updated Friday, Nov. 5, and includes a correction.*

More than 150,000 ballots were caught in U.S. Postal Service processing facilities Wednesday and not delivered by Election Day, agency data shows, including more than 12,000 in five of the states that have yet to be called for either President Trump or Democratic challenger, Joe Biden.

Another 39,000 ballots were processed Thursday, agency data shows, including more than 4,000, in the remaining swing states of Arizona, Georgia, Nevada, North Carolina and Pennsylvania.

Despite assurances from Postal Service leaders that agency officials were conducting daily sweeps for misplaced ballots, the mail service acknowledged in court filings that thousands of ballots had not been processed in time, and that more ballots were processed Wednesday than on Election Day.

The number of mailed ballots not delivered by Election Day is expected to grow as more postal data is released in the coming days. Some election experts worry such delays could run up against even more generous ballot acceptance windows that some states have granted.

In several swing states, late ballots will still be counted as long as they were postmarked by Election Day and received by Friday. They include Nevada, where 4,518 ballots arrived on Wednesday and 635 arrived Thursday, as well as North Carolina (2,958 on Wednesday and 835 on Thursday) and Pennsylvania (3,439 Wednesday and 1,459 Thursday). But states such as Arizona (864 Wednesday and 559 Thursday) and Georgia (853 Wednesday and 610 Thursday) don’t accept any ballots after Election Day.

Sam Spital, litigation director for the NAACP Legal Defense Fund, said the vast majority of those ballots were delivered in a timely manner and most were in states with more lenient ballot acceptance deadlines.

Because the counts are ongoing in those states, it is unclear whether undelivered ballots would have made a difference in deciding the presidential election. But the delivery failures highlight the risks in relying on the mail service to deliver ballots close to Election Day.

The Postal Service had warned voters not to mail ballots within one week of the Nov. 3 election, even though they are treated as first-class mail, which has a one- to three-day delivery window. The Biden campaign changed its messaging to encourage voters to use drop boxes or vote in person and avoid the mail system within 10 days of the election. The Trump campaign’s messaging was mixed: The president baselessly claimed mail-in voting was susceptible to fraud, though he and first lady Melania Trump have voted by mail themselves. And late in the general election cycle, his campaign courted supporters to vote by mail after seeing growing Democratic advantages.

Under Postmaster General Louis DeJoy, a major Trump financier who took over the agency in June, first-class mail delivery rates have steadily declined, especially in urban areas that are bastions of Democratic voters. In public statements, he called the safe and timely delivery of election mail his “sacred duty” and insisted the agency was up to the task of facilitating an election in which a record 198 million Americans were eligible to vote by mail. But the Postal Service’s summer struggles bled into election season almost immediately as Americans began voting in October.

On Wednesday, the Postal Service processed 94.5 percent of ballots on time, an improvement over recent days but below the 97 percent rate that postal and voting experts expect. Based on the agency’s one- to three-day ballot processing window, voters would have mailed those ballots on Sunday or Monday.

For the remaining 5.5 percent, or more than 8,000, of ballots that took longer to process, they would have been mailed between Thursday and Saturday.

In the nine postal districts serving the swing states of Arizona, Nevada, Pennsylvania, North Carolina and Georgia — which have yet to decide the presidential race — the on-time rate was 84.6 percent. That means roughly 15 out of every 100 ballots in processing plants were not sorted — or delivered — in time.

Postal Service spokesman David Partenheimer wrote in an emailed statement that the majority of the 150,000 ballots processed Wednesday were destined for states that accept ballots with pre-Election Day postmarks and that the votes would be counted under state laws.

“The Postal Service is required by law to deliver all mail that is deposited in our system. We cannot control when voters choose to mail their completed ballots, but we implemented extraordinary measures to ensure ballots were, and continue to be, delivered to the boards of elections as quickly as possible,” he wrote.

On Election Day, postal workers were instructed to submit ballots directly to vote counters, bypassing the regional facilities that account for the processing scores submitted Thursday to Judge Emmet G. Sullivan in U.S. District Court for the District of Columbia. Sullivan is overseeing one of several voting rights lawsuits filed in the aftermath of the Postal Service’s well-documented service declines. But the delivery numbers alarmed civil rights advocates, who say that the Postal Service was a vital and unavoidable component of election infrastructure for millions of Americans in the midst of the coronavirus pandemic.

“Voters put their ballots in the mail by this week and by this past weekend, and the only reason that their vote wasn’t counted was because of USPS delays,” Shankar Duraiswamy, an attorney representing the civil rights group Vote Forward, said in court Thursday.

Justice Department lawyers representing the mail agency have cautioned that the figures are not reliable. The data does not include “first mile” and “last mile” handling steps, which could add time to delivery, and only accounts for items the agency was able to successfully identify as ballots.

The Postal Service also aggregates bar code tracking scans for a ballot’s point of origin and destination into one report, meaning ballots that travel within the same postal district are counted twice. In analyzing the data, The Post counted every ballot once, since the vast majority of ballots are sent locally.

Some postal districts straddle state lines, but the Postal Service data does not specify how ballots in these districts are distributed between states. The Post’s state-level calculations assign a state every ballot of every district overlapping with that state. The numbers should be considered theoretical maximum values rather than precise tallies. For example, the three postal districts encompassing Georgia also cover parts of Tennessee, South Carolina and Florida. It is highly unlikely that all of the reported missing ballots are from Georgia voters.

The Postal Service reported to Congress on Thursday that it had processed 135 million ballots since Sept. 4, including blank ballots from election officials to voters, and completed ballots being returned to vote counters.

More than half of the late ballots processed Wednesday were in California, with 25,000 in San Diego alone. Another 16,000 were in the Bay-Valley postal district just south of San Francisco and 25,000 more were in the Sacramento and Los Angeles districts. Those ballots can arrive up to 17 days after the election and still be counted, according to extensions of state law because of the pandemic.

As of Thursday afternoon, Biden was leading Trump in Nevada by about 11,000 votes, with an additional 11 percent of ballots remaining to be counted. If that lead narrows considerably the 4,000 late ballots may become a factor in that contest.

In North Carolina, Trump was leading Biden by more than 70,000 votes with an estimated 95 percent of the vote in. In Pennsylvania, Trump was up by more than 100,000 with a lead most analysts expect to disappear, eventually handing the state to Biden. If those margins become close, the late mail ballots may come into play.

In Arizona, Biden’s current 70,000-vote lead is not likely to be affected by the roughly 400 late ballots found there. Similarly, the 800 ballots in Georgia could only potentially come into play if Trump’s current lead of more than 10,000 votes in the state narrows substantially.

The Postal Service is under overlapping court orders to devote “extraordinary measures” to move election mail. Those steps started on Oct. 20, and some are set to continue through the end of November. The agency authorized local post offices to create ballot-only drop-off lines and drive-through ballot submission lanes.

Judges in Pennsylvania, New York, Washington state and the District of Columbia also ordered DeJoy to halt a controversial cost-cutting agenda he implemented this summer that eliminated late and extra mail dispatch and delivery trips and sought to cut 64 million work hours, the equivalent of three weeks’ worth for its staff of 630,000.

The agency also removed more than 700 high-speed mail sorting machines, close to 15 percent of its inventory, over the summer. The move cut the Postal Service’s processing capacity by 21.4 million pieces of paper mail per hour. The agency routinely moves 450 million mail items a day.

Almost immediately, postal performance suffered. In the first five weeks after DeJoy’s policies took effect, more than 7 percent of the nation’s first-class mail was delayed.

Managers had cut back on overtime hours while the pandemic flattened the postal workforce. Mail backups were recorded across the country; it took some facilities close to a month to ameliorate the backlogs, according to union officials. Meanwhile, package volumes surged as a homebound nation patronized online shopping to avoid crowded stores.

The cumbersome boxes are more difficult to sort than paper mail, and stressed the Postal Service’s already understaffed operations. Packages frequently come with a guaranteed delivery window, leading supervisors to sometimes prioritize their delivery instead of daily mail, according to mail carriers. It led to a rise in document falsification on package delivery, a problem that’s plagued the mail service for years, according to Inspector General reports.

Partenheimer, the Postal Service spokesman, said the agency has been sweeping its processing facilities for election mail — including voter registration information, ballot applications and ballots — in January. It began publicly disclosing the daily “all clear” sweeps — sometimes completed by inspector general officials or agents from the U.S. Postal Inspection service, the agency’s law enforcement arm — in the last week of September in response to a federal court order in New York. But those reports did not describe what postal workers found during the checks, only that the checks were completed, not completed or failed.

In 10 percent of the reports, the Postal Service either found ballots that should have been processed, failed to complete the check or did not report the results.

The agency has published the results of only one ballot sweep in the entire election cycle. It reported to Sullivan on Wednesday that it found 815 ballots in Texas processing plants.

It reported the Thursday sweep results for 120 processing facilities in a court filing posted just after midnight Friday morning. Postal workers found 11,900 ballots, including more than 1,200 in Pennsylvania (781), North Carolina (479) and Nevada (17). Processing plants in Georgia and Arizona were not included in the data.

* Correction: A previous version of this story incorrectly stated that President Trump and first lady Melania Trump voted by mail in Florida. They voted in person in Florida in the 2020 general election and voted by mail in the state’s primary election.