SPRINGFIELD, Ill. — Last summer, with an important Illinois election season months away, Shelby County officials in central Illinois feared that their outdated voting equipment wouldn’t be approved for use by the State Board of Elections.

Most of it dates to 2004, and it’s becoming harder to find replacement parts. Often, it’s difficult to read the machinery’s paper record, which is needed to verify votes.

It passed inspection, but County Clerk Jessica Fox said the county, which is running a budget deficit, faces an upgrade of as much as $300,000.

“Sooner or later we must have new equipment, regardless of the costs,” Fox said.

Shelby County isn’t alone. Machine malfunction during the March 20 primary election was among the top reported issues to a hotline set up by the Lawyers’ Committee for Civil Rights, a national nonpartisan voter-protection group.

“Many old voting machines across Illinois jurisdictions caused delays, which resulted in voters losing confidence in the system and some leaving the polls without voting,” said Ami Gandhi, director of Voting Rights and Civic Empowerment for the committee’s Chicago branch. She added that some polling places opened late, sometimes because of malfunctioning equipment.

Election and cybersecurity experts agree that replacing aging voting systems, which typically last about a decade, is critical to defending against cyberattacks and maintaining public trust.

Congress has approved $380 million to upgrade equipment nationwide as part of its effort to prevent a repeat of 2016, when the Department of Homeland Security determined that Russian hackers tried to breach election systems in 21 states.

Illinois is the only state to publicly acknowledge hackers penetrated its voter registration system and accessed 76,000 active voter registration records. No records were altered or deleted, but the attack made some voters jittery.

In Wabash County, County Clerk Brenda Britton said one voter called before the 2016 election to say that he would not cast a ballot for fear that “voter information could be compromised.”

The Prairie State would get more than $13 million from the congressional plan, provided it puts up a 5 percent match. The State Board of Elections said it is adding $600,000 to its budget request for the spending year that begins July 1.

But that’s a fraction of the $147 million it got more than a decade ago from the federal Help America Vote Act, which allowed states to overhaul their voting systems. Compounding the fiscal problem is the approximately $4 million a year in grant funds for voter-registration system security that wasn’t available from the State Board of Elections for two years because of a historic state budget stalemate.

Illinois’ lack of election infrastructure investment has put the state in a tough spot, particularly given the federal government’s warning that another Russian attempt at interfering with the November election is likely.

Even if the state had enough funds, there wouldn’t be enough time to completely overhaul its voting infrastructure before November. The last effort to completely upgrade voting equipment, under the Help America Vote Act, took years.

A key question in Illinois, then, is the best way to spend limited funds during a narrow window. State elections officials are moving cautiously.

“I want to do whatever we can in the next seven months,” Cristina Cray, director of legislation for the State Board of Elections, told the House Election Security Committee last week. “But I want to use that money wisely.”

Few municipalities can afford a revamp on their own. Macon County, in central Illinois, spent $550,000 to replace its infrastructure before the 2016 election using fees from wind farms.

Chicago, where Board of Election Commissioners spokesman Jim Allen says that “the system is brittle, but not broken,” is considering an upgrade. But in the nation’s third-largest city, that’s a project carrying a price tag of tens of millions of dollars.

The federal Election Assistance Commission, which is overseeing the latest funding distribution, has suggested that states replace paperless voting machines. Paperless machines can’t be audited, meaning it’s difficult to detect a breach.

Illinois’ voting machines leave a paper trail, putting it ahead of other states, according to Lawrence Norden, deputy director of the Democracy Program at the Brennan Center for Justice at New York University. But Norden said Illinois uses devices called direct-recording electronic voting machines, which are prone to incorrectly record votes. That becomes an issue because voters often don’t check paper receipts to ensure their votes were recorded correctly.

The State Board of Elections said that more than 13,000 direct-recording electronic machines are still in use. Replacing them could cost as much as $4 million.

Norden adds that cybersecurity protections go beyond replacing machines. States should also protect their voter registration systems and implement better post-election audits to further strengthen public trust, he said.

“The most damaging thing that can be done is undermining people’s faith in democracy and potentially undermining their desire to participate and believe in our democratic institutions,” he said.

More In Budget