SANTA ANA, Calif. — A sprawling warehouse on South Grand Avenue holds the 11,000 voting machines that Orange County, California — the nation's fifth-largest voting district — has used in its elections for the past two decades. Every single one of them is about to become scrap metal, thanks in part to the stroke of a state official's pen.

California Secretary of State Alex Padilla has long been concerned about the vulnerability of the nation's voting machines. "We have done more to respond to hanging chads," he told NBC News, "than we have done to respond to Vladimir Putin and the threats by Russian intelligence officials against our elections."

So in February, Padilla took the bold step of ordering all of California's 58 voting districts to update their voting systems by the March 2020 primaries. If they don't comply or get an exemption, the county voting officials will face legal action from the state.

In Orange County, which has 1.6 million registered voters, that means the thousands of Hart eSlate machines in the Santa Ana warehouse are headed to the junkyard. But the county's top election official, Neal Kelley, is not in mourning for obsolete technology he compared to the Atari videogame systems of the 1990s.

"The components are no longer being manufactured," Kelley said, nodding at the rows and rows of doomed machines. "It's impossible to get some of these parts anymore. … [We've been] holding it together with Band-Aids and hope." And he points out that it's not just a problem with spare parts — updating security systems in such machines is nearly impossible.

Nevertheless, Padilla's plan to replace all of California's aging voting machines is an ambitious and expensive one. His mandate puts in place standards that are among the most rigorous in the nation.

Orange County Registrar of Voters Neal Kelley. Nightly News

NBC News contacted all 58 counties in the state. Many said they were worried about the cost but most believe they will make Padilla's deadline. Only 10 jurisdictions are requesting exemptions or protective extensions. Los Angeles County, which has more registered voters than 42 states, has been working for a decade to build its own system. The price tag: $100 million. Election officials there told NBC News it would be ready for the March 2020 primary.

Padilla told NBC News that the strict deadline he has imposed statewide is necessary for election security. He reiterated that he was serious when he said districts that didn't update by the March 3 primary would face consequences.

"Noncompliance is not an option," he said. "We have no choice."

California Secretary of State Alex Padilla. Nightly News

The problem is not unique to California, as states across the country scramble to deal with outdated voting technology before 2020. A study by the Brennan Center for Justice shows that 38 states use discontinued voting machines — machines that are no longer manufactured — in one or more jurisdictions. Another seven states use voting machines that have been discontinued in every jurisdiction. That means only five states don't use at least some machines that are no longer manufactured.

'A push off the cliff'

In Orange County, Kelley's office plans to spend $18 million to $20 million replacing the county's voting system in time for next year's primary.

Kelley said the county is still evaluating options, but whatever machine it selects will generate a paper backup ballot that will be available for an audit should there be need for a recount. Some of the voting systems under consideration would allow the voter to review that paper ballot before casting a vote, as will be the case with the new Los Angeles voting machines.

All new voting systems in California must generate a paper record of every vote. Twelve states currently have jurisdictions that use machines without paper backups. Without paper backups, there is no way to verify the accuracy of the vote should a recount be needed.

In California, post-election audits are routine. During audits, every county in the state manually tallies approximately one percent of the votes cast to verify the accuracy and integrity of its machine results. According to Padilla, those audits protect the system from fraud, and address critics’ often valid concerns about inadequately vetted manufacturers or potential manipulation of the electronic machines. In addition, California does not permit any voting machine or vote tabulator to be connected to the internet.

That still does not satisfy some critics, who contend the best system already existed long before machines — old-fashioned paper ballots. In fact, Orange County voters can still vote with paper ballots at home if they choose. According to Kelley, beginning 30 days before Election Day, voters can drop their paper ballots at one of 110 new secure drop boxes or mail them in.

Voting in person will begin 10 days before Election Day and continue through Election Day. The county currently has 1,000 polling stations; those will be replaced with what Kelley says are 180 updated, full-service voting centers. Election volunteers will be replaced by paid workers.

Kelley said that while he had not expected Padilla to issue an ultimatum, he believes it was time for a change. "I think there needs to be a push off the cliff," he said. Other states have been hesitant to jump off that cliff and are expected to limp into the 2020 election cycle with antiquated systems.