Megan Smith of Milford, right, and Seth Braun of Bangor go over materials before canvassing for Bernie Sanders on Feb. 22.

AUGUSTA, Maine — Maine is switching from party-run caucuses to a state-run primary for the 2020 presidential race. Those voters will determine the makeup of a slate of national convention delegates that officially decides the nomination.

Seven active candidates are competing for delegates in Maine: former Vice President Joe Biden, former New York City Mayor Mike Bloomberg, Vermont Sen. Bernie Sanders, Massachusetts Sen. Elizabeth Warren, Minnesota Sen. Amy Klobuchar, Hawaii Rep. Tulsi Gabbard and former Mayor Pete Buttigieg of South Bend, Indiana.

Maine Republicans are also holding a primary on Tuesday, though President Donald Trump is the only candidate on the ballot. There are no declared write-in candidates in the race, meaning votes for anyone other than Trump will be counted as blank, said Kristen Muszynski, a spokesperson for Maine Secretary of State Matt Dunlap.

Here’s how the allocation process will work for the Democrats, based on national party rules.

In Maine, 24 pledged delegates are up for grabs in the state on Tuesday. They will be allocated proportionally based on outcomes in three different jurisdictions: nine delegates are based on the vote totals in the 1st District, seven are based on the totals in the 2nd District and the remaining eight are based on the state’s overall results.

The most important rule is a threshold: Candidates are only eligible for delegates in each jurisdiction if they receive at least 15 percent of the vote there.

For example, the only poll of the Maine race released this year, by Colby College, had Vermont Sen. Bernie Sanders with 25 percent of votes and former Mayor Pete Buttigieg of South Bend, Indiana, receiving 16 percent. No other candidates made the 15 percent threshold.

If those results held and Sanders and Buttigieg both received equal proportions of votes in both districts, Sanders would come away with 14 delegates and Buttigieg would get 10 delegates. The outcome would change if results varied by congressional district or more candidates finished above the 15 percent threshold.

Also complicating matters is that the four Democrats who qualified for the Maine ballot before dropping out — New Jersey Sen. Cory Booker, former Massachusetts Gov. Deval Patrick, billionaire Tom Steyer, tech entrepreneur Andrew Yang and author Marianne Williamson — remain on the ballot. Votes for them will count and that could affect candidates who remain close to the threshold.

Eight other big-name Maine Democrats will be superdelegates to the national convention who could hold crucial votes. Maine will also send another eight superdelegates to the Democratic National Convention in Milwaukee this summer, though Maine Democrats voted in 2016 to require superdelegates to allocate their votes proportionately based on state’s results. 

Superdelegates come into play if no candidate has a majority of pledged delegates going into the convention. Maine’s superdelegates include Gov. Janet Mills, U.S. Reps. Chellie Pingree of the 1st District and Jared Golden of the 2nd District, and former U.S. Senate Majority Leader George Mitchell in addition to officials elected by the party.

There will not be ranked-choice voting in this election. Although the Legislature passed a bill last year to implement ranked-choice voting for presidential elections, Gov. Janet Mills held the bill until January before allowing it to pass without her signature. It will not take effect until later this year, but it would apply to presidential primaries starting in 2024.

Ranked-choice voting will be in play for the general election unless the Maine Republican Party gathers enough signatures to force a people’s veto vote on the law, in which case its implementation would further be delayed pending the outcome of a referendum in November.