DETROIT, MI - Michigan Democrats after a hard-fought race on Sunday endorsed Dana Nessel in the race for Attorney General.

"I will campaign my very hardest not just on behalf of myself... but on behalf of all Democratic candidates. We're going to win all the way up and all the way down the ballot," she promised after cinching the nomination.

Nessel and Pat Miles were running against each other for the spot. A third candidate, Bill Noakes, did not end up getting enough signatures to be eligible.

More than 6,700 members of the Michigan Democratic Party attended the convention on Sunday, filling the Grand Ballroom to standing room only.

Officially, the party picks nominees at its convention in August. But the early endorsement convention held Sunday aims to galvanize Democratic support behind a single candidate early.

Traditional party power brokers like the UAW and AFL-CIO had backed Miles. Groups like the party's cannabis caucus and progressive caucus backed Nessel in the race.

Nessel is an attorney who rose to prominence by challenging Michigan's constitutional ban on same-sex marriage, ultimately winning at the U.S. Supreme Court level.

Nessel will be the Michigan's first LGBT Attorney General if elected. In a nomination speech, Plymouth Democratic Club President Mary Maguire highlighted Nessel's leadership on the U.S. Supreme Court case.

"Progress like this is made because people like Dana Nessel never give up," Maguire said.

Nessel said she promised herself she would not lie to anybody in the course of campaigning, and she thinks her honesty resonated with people.

"Maybe some of the things that I said were unpopular. But at least they were honest, and that's what I intend to do throughout the rest of the course of this campaign," Nessel said.

She said she plans to court union members and show them she stands by them, even though major unions endorsed her opponent.

Jeff Hank, a leading marijuana activist, said Nessel had been strongly in favor of legalizing marijuana from the beginning. The UAW and AFL-CIO getting behind Miles and losing showed a disconnect, he said.

"Times are changing and they're not listening to the people, they're not in touch with the people," Hank said.

Marijuana is an issue bigger than any one candidate, he said, and Miles' position on it evolved.

Before voting started, supporters of both candidates voiced support. Stickers and t-shirts indicating support for Nessel or Miles dotted the crowd.

Paul Massaron, of Southfield, is a UAW member who was sporting a Miles sticker. The union endorsed Pat Miles in the race for attorney general, and he personally was supporting Miles as well.

"I think he'd be the best candidate for the party to put forward for Attorney General," Massaron said.

He said Miles has a good resume and positive positions on important issues like consumer protection, keeping state government accountable and civil rights.

Emily Wolfe, of Farmington Hills, came out to support Nessel. She works as an assistant prosecutor in Wayne County, and worked with Nessel when she was there. On Sunday, she wore a Nessel shirt, handed out stickers, and gave people directions as they walked into Cobo Hall.

A number of people coming in assured her they were already voting for Nessel - for some, her candidacy was the only reason they showed up.

"I think that she is probably more electable, and definitely more qualified," Wolfe said.

She said Nessel was an experienced prosecutor. As attorney general, she thinks Nessel will bring the office back to fighting for "the little guy."

The race highlighted a divide within the party. While Miles had earned the support of the AFL-CIO and UAW, traditional convention powerbrokers, Nessel had earned the support of the party's progressive caucus, made up mostly of supporters of Bernie Sanders' presidential run.

Before the vote took place, many urged party unity regardless of result.

"I hope you will agree we can't say 'well my candidate didn't win...' enough is enough, we need to be united or we do not win. We need to be united," said U.S. Sen. Gary Peters.

Miles in a brief concession speech congratulated Nessel on her win and urged the party to unite behind its slate of candidates.

But Keith Williams, chair of the party's black caucus, said a slate with no African Americans was not reflective of the party and could come with a loss of enthusiasm from African American voters.

"It's got to have some reflection of how the state of Michigan looks," Williams said of the overall ticket.

Assuming the party also formally nominates Nessel at its August convention, she will face the Republican nominee in the Nov. 6 general election.

The MDP also endorsed a slate of candidates who were looking for uncontested seats Sunday: Jocelyn Benson for Secretary of State and Megan Cavanagh and Sam Bagenstos for two Michigan Supreme Court spots. Those candidates were endorsed through a voice vote.

The Democratic and Republican parties will officially nominate candidates at an August convention. The candidates for governor will face off in an August primary. The parties' candidates will run against one another in the Nov. 6 general election.