BANGOR — Maine Republicans selected their slate of delegates to the Republican National Convention on Saturday following a two-day gathering where Ted Cruz’s campaign flexed its organizational muscle despite heavy lobbying by Gov. Paul LePage.

The Maine Republican Party’s convention became a mini-front in the national battle between Cruz and Donald Trump as each campaign fought to fill as many of Maine’s 23 delegate seats as possible with loyal supporters ahead of a potential “contested” national convention.

In the end, 19 of Maine’s 23 delegates headed to the national convention in Cleveland are professed Cruz supporters, while two – including LePage – support Trump and two are as-yet uncommitted. Those figures wouldn’t affect the Maine delegation’s votes on the first ballot in Cleveland because, under state party rules, nine of Maine’s delegates are “bound” to Trump by the outcome of the state caucuses in March. Cruz won 12 delegates at the caucuses and Ohio Gov. John Kasich won two.

The Cruz campaign’s virtual sweep of Friday and Saturday’s delegate-election process could be consequential, however, if Trump fails to win the nomination on the first ballot. In such a scenario, Maine’s delegates are no longer bound by the caucus results, allowing at least 19 of the 23 to cast their ballots for Cruz, a U.S. senator from Texas.

One of the co-chairmen of the Cruz campaign in Maine, Sen. Garrett Mason of Lisbon Falls, was ecstatic after the delegate election.

“If you listen to the Trump team, they would tell you that we are not going to a second ballot … but we don’t believe that’s the case,” said Mason, one of the 19 pro-Cruz delegates elected Saturday. “We think that Senator Cruz is going to win this on the second ballot and we need the delegates to make that happen. Every vote counts, and the votes in this case are delegates.”

LePage, a vocal Trump supporter, will be one of at least two pledged Trump delegates attending the national convention July 18-21 along with Alex Willette, one of Maine’s two representatives to the Republican National Committee. The other representative, Ashley Ryan, said Saturday she was remaining uncommitted until the convention, as will the 23rd delegate, state party chairman Rick Bennett.

But the Cruz campaign’s sweep of the 14 at-large delegates – plus five of the six delegates from Maine’s congressional districts – was arguably a political blow to a governor still hugely popular within the Republican activist base.

For his part, LePage pledged to support the eventual nominee despite his personal attempts to protect Trump’s nine delegates during a contested convention.

“It makes no difference to me whether it’s Kasich, Trump or Cruz, but it better be one of them,” LePage told the convention crowd Saturday night. “Because, frankly, we cannot stand another liberal in Washington.”

LePage’s election as a delegate was in question Friday night, prompting some angry rhetoric from Maine’s outspoken governor directed at top national staffers at the Cruz campaign.

LEPAGE: CRUZ STAFFER ‘BROKE THE DEAL’

LePage and Trump’s campaign tried to win support for a “unity slate” or ticket that would preserve the delegate breakdown that emerged from Maine’s caucuses. The governor lashed out at Cruz’s campaign on conservative talk radio and in social media Friday after the unity ticket proposal faltered.

“We reached a deal with Cruz’s national campaign to put up a unity slate that would honor the wishes of the thousands of Mainers who voted at caucus,” LePage wrote in a statement posted on his Facebook page. “But Cruz’s Northeast Political Director David Sawyer lied to us and broke the deal. Sawyer stabbed us in the back, reneged on the unity slate and betrayed the Maine people. As we have seen throughout the country, Cruz’s national campaign is run by greedy political hooligans.”

Willette, who works for the LePage administration, worried Saturday afternoon that a contested convention could alienate many voters who participated in the primaries and caucuses.

“I think millions of Republicans voters across the country have gone to the ballot box and voted for Donald Trump,” said Willette, a former Rand Paul supporter who has pledged to cast his delegate vote for Trump. “If the party elite turns its back on Donald and nominates someone other than Donald Trump, it will send the wrong message to those who have voted for Trump in all of the states.”

On Saturday morning, the Cruz and Trump campaigns were busily attempting to solidify their votes by distributing sheets of “slates” of delegates as attendees entered Bangor’s Cross Insurance Center. But there were also several hours of speeches intended to rally the base or promote Republican candidates for Congress.

U.S. Sen. Susan Collins sought to energize the crowd by touting Maine manufacturing, talking about the Republican Party’s history – from Lincoln to Reagan – and accusing President Obama of overreaching his executive powers.

Both she and U.S. Rep. Bruce Poliquin, who is seeking his second term representing Maine’s 2nd District this fall, also criticized the Obama administration for failing to adopt a policy requiring the military to issue American-made athletic footwear to new recruits. That policy, known as the Berry Amendment, would likely benefit 900-some Maine workers because New Balance is one of the only manufacturers still making athletic shoes in the U.S.

Poliquin delivered more of a campaign stump speech.

“Two years ago, in 2014, we made history by winning this seat and I will tell you flat-out that we are not giving it back,” Poliquin said. “This is a great time to be a Republican. We are happy warriors … because after 40 years in the wilderness Maine is no longer a blue state. We are a purple state. Now we have a job to do. We need to finish this job to make sure we work hard and we turn Maine red.”

PLEAS FOR UNITY AMID THE SCRAMBLING

Part of Saturday afternoon’s program was also dedicated to speeches by surrogates for the Cruz and Kasich campaigns.

Cruz supporter and businesswoman Carly Fiorina, herself a former presidential candidate, said she understands that Trump supporters want someone who will “fight the system.” But Fiorina added “he is the system” and called Trump and Democratic front-runner Hillary Clinton “two sides of the same coin.”

Fiorina then shared how she “checked the box” for Cruz in the Virginia primary not long after she had suspended her own campaign because the country needs a “constitutional conservative” in the White House who will challenge the system.

“I’m going to encourage you to search your hearts for what’s at stake now and I urge you to cast your votes for this slate,” Fiorina said while holding aloft the proposed slate of Cruz delegates.

Still, many others at Saturday’s convention were trying to emphasize party unity despite the behind-the-scenes scramble for delegates.

“The message today was one of unity and that we must all work together to ensure Republican victories this year,” Collins said. “This has been an unusual political season and I think it’s important that we remember that in addition to the presidential race, we have some very important races here in Maine.”

Attendee Jay Riley, meanwhile, was walking around the convention floor holding an official Trump sign with the words “TRUMP/CRUZ” and “UNITED WE STAND” scrawled in black marker.

Riley, of Bar Harbor, said he initially supported Cruz when he first announced but has also liked Trump for more than 20 years.

“I think he (Trump) is one who can close the deal for the Republican Party” to win back the White House, Riley said. “I don’t believe Cruz can close the deal.”