Thousands of Maine Democrats gathered in Portland on Saturday unified in their opposition to Donald Trump but still divided over which candidate is better equipped to take on the controversial Republican this November.

The split between the Bernie Sanders and Hillary Clinton camps was evident from the start of the second day of the Maine Democratic State Convention, when Sanders backers successfully led an effort to change the role of “superdelegates” in the national nominating process. But the debate over superdelegates – delegate seats held by party leaders free to vote for a candidate of their choosing – provided a lively and at times rowdy flavor to a convention focused on building party unity ahead of the upcoming state and national campaigns.

In a message aimed at national party leaders, Maine Democrats voted to require that, beginning in 2020, the state’s total delegate votes at the national convention must be awarded proportionately to the results of the state’s presidential caucus or primary. That could bind some superdelegates – who currently hold five of Maine’s 30 seats to the Democratic National Convention – to supporting certain candidates in order to maintain the outcome of the statewide vote.

The proposal, which was sponsored by state Rep. Diane Russell, D-Portland, would urge but not require this year’s superdelegates to honor the outcome of the Democratic caucuses in March, when Sanders won 63 percent of the votes amid record turnout in Maine. Finally, it calls on the national party to eliminate the superdelegate system altogether.

“The reason that I have put this in is we have heard from people all across the state about how frustrated they are that you can actually have a popular vote where 63 percent of the delegates go to one candidate, and yet superdelegates are not voting in proportion to that,” Russell told the fired-up crowd. “I want to fix it.”

Lynn Luzzi of Rockport, however, pointed out that superdelegates are typically individuals entrusted with party or legislative leadership roles that have provided them with experience and insights.

“This proposal would deprive us of that knowledge when selecting our presidential candidate,” Luzzi said, only to be met with loud boos from some in the crowd. “This proposal would make superdelegates redundant with the popular vote. And we’ve seen how well only having the popular vote has served Republicans.”

Superdelegates have become an issue nationally as both Clinton and Sanders try to lock down the nomination. Clinton has won the most pledged delegates via state caucuses or primaries but also has a larger number of superdelegates. Sanders’ only mathematical hope to win the nomination is to continue winning pledged delegates but also flip some of those Clinton superdelegates to his side.

Three of Maine’s superdelegates – U.S. Rep. Chellie Pingree, state party Vice Chairwoman Peggie Schaffer of Vassalboro and Democratic National Committee member Maggie Allen of Madison – are Clinton supporters, while former state Sen. Troy Jackson of Allagash is helping lead Sanders’ campaign in Maine. The fifth superdelegate, Maine Democratic Party chairman Phil Bartlett, is uncommitted.

Some critics of the superdelegate system had tried to make Saturday’s vote binding on Maine’s delegation to the upcoming Democratic National Convention in Philadelphia.

“No one is super. We’re all even,” said Joanne Twomey of Biddeford. “We’re all in this together.”

But party leaders warned that such a move could have serious repercussions at the national convention – including the potential loss of some or all of the state’s delegates. Although Republicans do not use superdelegates, a similar scenario played out in 2012 when the Republican National Committee removed 10 of Maine’s 20 delegates pledged to Ron Paul and replaced them with Mitt Romney supporters because of events at the state convention.

“We had a delegate-selection plan approved by the Democratic National Committee and we have to follow that to a T,” Bartlett said.

Convention attendees also approved an official party platform and elected those delegates to the Democratic National Convention. The rest of Saturday, however, was devoted to speeches.

Jackson, the Allagash logger who represents Maine on the Democratic National Committee, gave arguably the most rousing speech of the afternoon in support of Sanders. Jackson talked of Sanders’ “political revolution” as the Vermont senator fought for universal, single-payer health care and against Wall Street abuses, fracking and international trade pacts that he said only hurt the American worker.

Jackson credited Sanders with bringing more progressives, young people and blue-collar workers back into the Democratic ranks.

“Are you ready to demand a world that you want? Are you ready to change it?” asked Jackson, who is known for his barn-burning speeches. “Well, I fear Donald Trump and his hate-filled drivel will be far more formidable in November than we expect unless we nominate a candidate who articulates this inspiring vision. We need a Democratic nominee who speaks to the concerns that Americans have, the challenges they face and the pain that they have been through.”

Clinton’s surrogate speaker, former U.S. Rep. Barney Frank of Massachusetts, had a tougher time with the largely pro-Sanders crowd, beginning with cries of “sellout” from a few in the audience. A 32-year veteran of Congress, Frank soldiered through the hecklers and even paused on numerous occasions to answer their questions, at one point telling them, “One heckler at a time.”

Frank pledged to support Sanders if he won the nomination but said all evidence suggests that Clinton is headed for the nomination. The first openly gay member of Congress and the husband of a Maine man, Frank predicted Clinton would be “a more effective advocate” for Democratic causes and asked Sanders supporters whether they would help give the election to Trump by forgoing a vote for Clinton.

“If it comes down to Clinton versus Trump, the people in this room that are supporters of Bernie Sanders … are you going to disregard the passionate views of the LGBT voters?” Frank said. “Are you going to disregard the deep convictions of the overwhelming majority of African-Americans or of Hispanic leaders? Because that is what’s at stake.”

Pingree, who is seeking her fifth term representing Maine’s more liberal-leaning 1st District, was greeted with chants of “Change your vote” from Sanders supporters as she took the stage Saturday evening. A member of Clinton’s campaign leadership team in Maine, Pingree said she supports Maine Democrats’ position on eliminating superdelegates.

But Pingree wouldn’t commit either way on her vote, saying, “I will decide what to do when it comes to July.”

Turning to Trump, she accused the Republican of being motivated by greed, questioned his support for fighting climate change, and said, “Don’t even get me started about what he says about women.”

“If Donald Trump is our president, for our country and for the world, we will be suffering a trauma like we have never been exposed to before,” Pingree said.

Emily Cain, a former Orono lawmaker running for Maine’s 2nd Congressional District seat, accused the Republican incumbent, U.S. Rep. Bruce Poliquin, of looking out “for Wall Street millionaires like himself.”

“I’m ready to fight for working families, for small businesses, for seniors, for veterans and for students,” Cain said.