In this May 19, 2018 file photo, gubernatorial candidate Janet Mills acknowledges supporters at the Democratic convention in Lewiston, Maine. Credit: Robert F. Bukaty | AP

AUGUSTA, Maine — Attorney General Janet Mills won Maine’s 2018 Democratic gubernatorial nomination after unofficial ranked-choice counts from the state were released Wednesday, defeating attorney Adam Cote and five others after last week’s elections.

It took eight days for the winner to be declared by Secretary of State Matt Dunlap’s office after the voting method approved by Maine voters in 2016 was used in a statewide election for the first time in U.S. history in four different races.

While Republicans picked businessman Shawn Moody for governor in a landslide on Election Day, Democrats had to wait for Mills of Farmington to be declared the winner over Cote of Sanford, lobbyist Betsy Sweet of Hallowell, former House Speaker Mark Eves of North Berwick and three others.

Mills won in a fourth and final round of ranked-choice voting with 54 percent of votes to Cote’s 46 percent after the five other candidates were eliminated. She perhaps most embodies the candidates with legislative backgrounds the party has nominated over the past eight years — a tough period for Democrats, who have receded during the era of Gov. Paul LePage.

Moody and Republicans jumped to affix the “insider” label to her instantly on Wednesday evening, but she told reporters in Augusta that isn’t what the campaign will be about.

“It’s about my vision of a Maine that is undivided, is prosperous north to south, west to east and a Maine that works for everybody,” Mills said.

Democrats saw their sitting Maine Senate president, Libby Mitchell, finish in a distant third place behind LePage in 2010. Then-U.S. Rep. Mike Michaud fell short in his bid to unseat LePage in 2014. His seat was lost after 20 years of Democratic control to U.S. Rep. Bruce Poliquin, a Republican. Longtime Democratic legislator Emily Cain lost to Poliquin in 2014 and in 2016.

But Democrats may have an opportunity in a national environment that may tilt toward them with President Donald Trump’s approval underwater nationally. Elections between presidential election years often favor the party that doesn’t control the White House — as they did for Republicans in 2010 and 2014.

However, Maine has been slightly hotter on Trump than the rest of the country and there are signs that it may not be a wave year for Democrats here. Before Republicans took control of state government from Democrats in 2010 behind LePage and new legislative majorities, 48 percent of their registered voters showed up for the primary to 38 percent of Democrats. Democrats roughly matched that 2010 turnout this year. Republicans were lower at 34 percent.

Mills and Cote sparred more than any other two candidates in the field. Mills and her allies — including EMILY’s List, a national group that poured in $300,000 to help her in the last week — noted that Cote had been a Republican.

Cote and others in the field hit her for past high marks from the National Rifle Association and for fighting Maine tribes on water rights. Lobbyist Betsy Sweet and former House Speaker Mark Eves finished in third and fourth place after teaming up against Mills at times during the race.

Mills, 70, is an Augusta insider from one of Maine’s major political families. She was the first female district attorney in New England when she was elected in 1980, serving for 15 years. She served in the Maine House of Representatives and is now in her second stint and eighth year as Maine’s first female attorney general.

Mills will now take up the party’s mantle against Moody, 58, of Gorham, who ran for governor in 2010 as an outsider independent who called himself neither “liberal” nor “conservative.” He re-emerged last year to run again as a conservative Republican with backing from many of LePage’s top strategists.

National groups jumped to define the candidates on Wednesday evening. In statements, the Republican Governors Association called Mills “a tax-and-spend career politician” and their Democrat counterpart said Maine doesn’t need “more of the same failed LePage agenda.”

At a Republican unity rally on Tuesday, Moody indulged comparisons to LePage as the governor watched from the audience, saying he’d build on the “foundation” that LePage has laid. Later, he told reporters that he didn’t have a preference as to which Democrat he runs against.

“I really feel like we’ve got a strong message for the state of Maine, the people of Maine,” Moody said then. “People in Maine are tired of getting by. They want to get ahead.”

Two independents will also be on the November ballot for governor — Maine State Treasurer Terry Hayes of Buckfield and consultant Alan Caron of Freeport. She has qualified for Maine’s taxpayer-funded campaign system and Caron put $450,000 in personal money into the race.

For a roundup of Maine political news, click here for the Daily Brief. Click here to get Maine’s only newsletter on state politics via email on weekday mornings.

Follow the Bangor Daily News on Facebook for the latest Maine news.

Michael Shepherd joined the Bangor Daily News in 2015 after three years as a reporter at the Kennebec Journal. A Hallowell native who now lives in Augusta, he graduated from the University of Maine in...