Democrat Mike Michaud on Tuesday lost his bid to govern Maine and make history as the nation's first openly gay governor.

Michaud conceded defeat to incumbent Republican Governor Paul LePage shortly after midnight.

“It has been a tough campaign and I know you are as disappointed as I am,” Michaud told supporters, according to the Portland Press Herald. “But now it is time for all of us to put our difference aside and work together. This election is over but the hard work of building a better tomorrow continues.”

“It was a hard-fought battle,” he said of the tight race. “We have nothing to be ashamed of.”

Michaud, who served six terms in Congress, came out gay in an op-ed last year in response to what he described as an ongoing “whisper campaign.”

The Maine race attracted national attention and outside groups spent millions. The Press Herald called it the “most expensive gubernatorial race in state history.”

Michaud's campaign was endorsed by LGBT rights groups the Human Rights Campaign (HRC), the Gay & Lesbian Victory Fund and Equality Maine.

Chuck Wolfe, president and CEO of the Victory Fund, said the campaign was his group's top priority this election cycle.