Portland’s Democratic leaders are taking heat for long lines and voter registration issues at the party’s caucus in the city on Sunday, problems that the party’s local chairwoman attributed to an unexpectedly large turnout among new voters that overwhelmed volunteers.

Voters waited three to four hours in a line that stretched a half-mile from Deering High School, the caucus site. And some voters said they weren’t able to register to vote when they finally got to the school, despite being in line in time.

“It’s disappointing that yesterday the system failed,” Portland Democratic City Committee Chairwoman Jill Barkley said Monday. “We – and I speak on behalf of our party – we’re regretful that the system failed yesterday.”

Portland Mayor Ethan Strimling called the Portland caucus “an organizational nightmare” and said he will work with party leaders to ensure a similar situation doesn’t occur again.

“On a day when so many Democrats turned out for a really exciting opportunity to cast a ballot and exercise their constitutional right, to see people standing out in the cold for hours was very frustrating to watch,” he said. “We should be celebrating the great candidates that were on the ballot. Instead, we’re talking about folks who may have gone home because they didn’t have an opportunity to vote or who weren’t able to get registered to vote.”

More than 46,000 Democrats statewide participated in Sunday’s caucuses, including about 4,000 in Portland. About half of Portland voters at the caucus, drawn by the opportunity to support presidential candidates Bernie Sanders or Hillary Clinton, were registering to vote for the first time or enroll in the Democratic party.

The Portland City Clerk’s Office also was criticized by some voters for leaving the caucus Sunday while some people in line had yet to register to vote so they could participate in the caucus. However, Strimling said City Clerk Katherine Jones and her staff went “above and beyond” what was required of them and that the blame is misdirected.

Under state law, the city clerk must be on hand at the caucus for one hour to register new voters who want to join a party on caucus day. On Sunday, a staff of nine city employees was at the caucus site from 10 a.m. to 5 p.m. to register new voters and enroll voters as Democrats.

The clerk’s office registered nearly 2,000 new voters on Sunday, far more than party leaders anticipated. With a little more than 24,000 previously registered Democrats in Portland before the caucus, the party experienced an 8 percent one-day enrollment surge in Portland.

“I recognize that people were frustrated, but it was incredible to see the turnout and it was incredible to see so many new voters,” Barkley said.

The party hadn’t released an official caucus result Monday, but Sanders won the Portland caucus, 69 to 31 percent, as well as the statewide vote, 64 percent to 36 percent, based on 91 percent of returns counted, according to a tally Sunday by the Associated Press.

Emily Tabb, 17, said she mailed in her voter registration more than a month ago, and tried to make sure she was registered when she arrived at the caucus at 12:30 p.m. After waiting in four different lines, she was able to register to vote for a second time and cast a ballot.

“It was very frustrating because I had taken a lot of measures because I was so excited to vote in my first caucus,” said Tabb, who will turn 18 before the general election in November. “It was annoying to have to go line to line and keep waiting. It was also frustrating to see I wasn’t the only one who had that problem.”

Peter Michalakes, a 17-year-old senior at Waynflete, registered to vote in early February so he could take part in his first caucus. After standing in line from 1 to 5:30 p.m., he was told he wasn’t on the list of registered voters. When he got to the room where staff from the city clerk’s office were working, he was told they were packing up to leave and were done registering voters. He was able to vote using a provisional ballot.

“I was pretty shocked by the whole thing,” Michalakes said. “There was a lot of hostility in the room.”

Jon Hinck, a Portland city councilor and state senate candidate, said he was in the room designated for people with registration issues when the city clerk’s staff left. He said the clerk and her staff had worked all day without a lunch break and that the city clerk told him she believed everyone who was in line by 1 p.m. had been able to register to vote. The committee had advertised that anyone in line by 1 p.m. could register to vote.

“The overall sense in the room was extreme frustration,” Hinck said. “For some of the individuals, that was paired with some resignation. For a few people, their frustration was closer to a boiling point.”

Jones, the city clerk, did not respond to a request for comment Monday.

Barkley, the city committee chairwoman, said the committee had taken steps to avoid the problem the party ran into during the 2008 caucus.

During that event at Portland High School, voters complained about a lack of parking and a confusing layout. There also weren’t enough staff members from the city clerk’s office to register voters, she said. The committee moved this year’s caucus to Deering High School because it has a better layout and ample parking, and the city clerk had more people on hand to register voters.

“We tried to design a caucus at a different location that worked better, but unfortunately when 4,000 people show up – and so many of them new voters – it presented a really overwhelming challenge. Regardless of the location or the number of volunteers, it was going to be a time-consuming process,” Barkley said. “I think that now is really the time for the leaders of the Portland Democratic City Committee, the Maine Democratic Party and the city of Portland to work together instead of pointing fingers.”

Barkley said one option that could be considered is to hold future caucuses at multiple locations, but said that would take a “tremendous” amount of resources because it would be more costly and take additional volunteers to run.

Strimling said 50 to 75 people who were not able to register to vote gave him contact information. The city clerk’s office will contact each of those people to make sure they are registered to vote for the next election, he said.

Despite the long lines and some frustration among voters, there were voters who praised the caucus process and the volunteers who organized it.

Barbara Schlichtman of Peaks Island said it was clear voters were excited to come out to support their candidate.

“By the time people got in and cast their ballot, they had waited a long time in the cold. It was a little bit celebratory,” she said. “It made people realize they really wanted to vote. I think that speaks volumes to people being excited about the upcoming election.”