Malfunctioning machines, voter confusion and locked polling sites were among the problems punctuating Election Day as millions of Americans cast ballots Tuesday in a midterm election fueling an outpouring of enthusiasm — and frustratingly long lines.

Nick Alexander, 50, arrived at his polling site in Snellville, Georgia, at 7:15 a.m. He expected to be out quickly, but the trip turned into a three-hour ordeal.

"The lines were very long, but had they opened up and done everything right, it would have been a breeze," Alexander said. "We could get in and get out, and people could make it to work on time."

Long waits, jammed machines and other voting glitches were reported across the country:

Humidity was causing issues in North Carolina and Alabama, where ballot tabulators couldn't read ballots. In New York City, where lines were out the door, election officials said rain had wet ballots and caused scanners to jam.

Polling times in parts of North Carolina and Georgia were extended after voting issues and delays.

Homeland Security officials said they detected no successful hacking attempts.

Voting hours were extended at several locations in Georgia, a battleground state where Stacey Abrams, the former Democratic leader in the state House, was neck and neck with Republican Secretary of State Brian Kemp in the race for governor. Georgia has been roiled by claims of attempted voter hacking and the purging of tens of thousands of voters, most of them black, from its rolls.

In Fulton County, home to Atlanta, the capital, a judge extended voting by two hours, until 9 p.m., at Pittman Park Recreational Center because the site had too few voting machines. Voting was extended by three hours, until 10 p.m., at the Archer and Booker T. Washington polling places on the campus of Morehouse College because of significant delays.

The machines at Anderson-Livsey Elementary School in Snellville stopped running after their batteries died. A spokesman for Gwinnett County said that the appropriate power cords had to be retrieved and that the machines were working again around 9:15 a.m.

Alexander said that only a couple of poll workers were checking IDs and that the line "moved at a snail's pace." A judge ordered that the polling station stay open a half-hour late, until 7:30 p.m.

Happen to know anybody who could do this in Georgia? 🤷‍️ no voting at my dads polling site pic.twitter.com/zEyQmXwEq2 — DG911 2lite (@_2lite) November 6, 2018

That wasn't the only issue in Snellville, a small city in suburban Atlanta: At Annistown Elementary School, faulty polling machines caused a 25-minute delay after the site opened, and people weren't given paper ballots, as is protocol.

The issue was fixed, a Gwinnett County spokesman told NBC News. A judge later ordered that the Annistown polls remain open until 7:25 p.m.

At a news conference outside a polling site in Snellville, former Democratic state Sen. Jason Carter said people waited in line for 4½ hours in some cases. But he was hopeful — even if some voters were visibly annoyed.

"If they had to leave, they're all coming back," said Carter, a grandson of former President Jimmy Carter.

Sheer record turnout also caused some of the problems as voters in many areas showed up to find too few voting machines, poll workers or ballots.

Long lines hundreds of students deep waited to vote at the Palo Verde West voting center at Arizona State University in Tempe as officials scrambled to set up more voting booths outside to meet the demand. Before this add, there were only about nine voting booths inside a cramped room with one door in and out.

Colleen Condon, a Democratic voting rights advocate in coastal South Carolina, called the turnout "super," but she criticized the state for not being ready to handle so many voters.

"Our voting machines are almost 14 years old, we pay poll workers minimum wage for a 14-hour day, and we don't have enough laptops to check people in," Condon told NBC News by phone while in line to vote at West Ashley Magnet School in Charleston County.

"There are over 600 people in line and only four people checking voters in," she said.

Across the country, there remained a larger concern over voting irregularities and the potential for fraud following a 2016 election tainted by accusations of Russian meddling. Congress this year approved $380 million to help safeguard voting systems. States divvied up the pot, part of which has gone toward improving cybersecurity and new voting equipment.

Officials at the Department of Homeland Security, or DHS, said at midnight Tuesday that they had detected no successful attempts to hack voting systems. But they said they assume that foreign influence efforts will continue with the same kind of disinformation that's been widespread in recent months.

Earlier, DHS officials said problems caused by severe weather in the Deep South and along the East Coast had been minimal.

Still, technical difficulties and voter confusion abounded in some states.

In Geauga County, Ohio, east of Cleveland, some people reported that when they went vote, they were incorrectly told that they had already filed for absentee ballots.

Debbie Reiter, director of the Board of Elections in Geauga County, said that staff was being sent to the county's 35 voting locations to fix the issue and that all precincts in Chardon, the county seat, had already been fixed.

Sign up for Breaking News Alerts from NBC News

The problem occurred because of a miscommunication with the county's vendors — specifically, "the voter registration system did not talk with the electronic poll pads," Reiter said.

Voters in five of the seven Indiana counties served by the voting technology company Elections Systems & Software, or ES&S, experienced difficulties checking in to vote.

Brown, Carroll, Elkhart, Hancock and Johnson counties, which have a combined population of more than 450,000 people, all experienced problems. ES&S provides pollbook services — electronic tablets that are used to verify voters' eligibility.

Meanwhile, even the humidity was causing problems for voters in North Carolina and elsewhere in the South.

At polling sites at firehouses and gymnasiums in Raleigh and Wake County, tabulating machines were having difficulty reading ballots because of a lack of air conditioning, officials said.

The state's Board of Elections and Ethics Enforcement said the ballots were being stored in "emergency bins" until the moisture problem was resolved.

Voters stand in line to cast their ballots on Tuesday at P.S. 22 in the Prospect Heights neighborhood in Brooklyn, New York, where four vote scanning machines reportedly broke down earlier in the day. Mark Lennihan / AP

Gary Sims, director of the Wake County Board of Elections, said that the vote-counting machines had been extremely sensitive and that if any moisture touched the ballots, it could cause the tabulating machines to refuse the ballots.

Additional machines were being trucked in to count the ballots, and fans were also set up, Sims said.

Given the delays, North Carolina voters standing in line when polls close at 7:30 p.m. were supposed to have their votes counted.

A similar issue was reported in Madison County, Alabama, where a probate judge said moisture in the air was causing ballots to swell.

Reports of voting difficulties, including polling sites that were unable to handle huge lines or didn't open on time, so upset New York City Council Speaker Corey Johnson that he tweeted that Michael Ryan should step down as executive director of the city's Board of Elections.

"It is like Groundhog Day every single Election Day sadly in New York," Johnson told NBC News early Tuesday afternoon. "Long lines, machines aren't working, and chaos at voting sites. Today we are getting reports of this in every single neighborhood in all five boroughs."

Ryan acknowledged that polling sites had grappled with a "high volume" of voters and that four scanning machines in one location in Brooklyn were temporarily down.

He responded to the suggestion that he resign by saying there would be "plenty of time post-election to assess circumstances."

In the Brooklyn neighborhood of Canarsie, voters who tried to cast ballots early at the Breukelen Community Center arrived to find firefighters prying open a locked polling place at 6 a.m.

"People outside the voting station were saying that they can't vote because they have to go back to work," Brooklyn resident Jalessa Parris said.

The firefighters managed to open the doors, Parris said, but it wasn't the entrance for the polling location.

The New York Fire Department later said firefighters hadn't been called to open the building but instead to help a poll worker who had been locked between doors. By about 8 a.m., a worker came carrying the right key, Parris said, and she was able to vote a half-hour later.

She remained upset, however, that it took over two hours for her to cast a ballot.

"It doesn't make sense that one person had one key to open up this community center," she said.

Christopher Thomas Queen is accused of threatening to shoot workers at a western Pennsylvania polling place after they told him he wasn't registered to vote on Tuesday. Washington State Police

Election officials in Washington County, Pennsylvania, south of Pittsburgh, dealt with a scare on Tuesday: Christopher Thomas Queen, 48, of Claysville was arrested and accused of threatening to shoot workers at a fire station polling place after they told him he wasn't registered to vote.

Queen left but told poll workers that he was going to get a gun and shoot them, said Melanie Ostrander, assistant elections director for Washington County. It was unclear whether he had an attorney.

In Goodyear, Arizona, police said they arrested a man who took a holstered BB gun to a polling place. Police said Brad Luebke, 37, was asked to leave the polling place and refused. He was determined to be violating Arizona law and charged with multiple counts of disorderly conduct, authorities said.