The analysts predicted this would happen, but that doesn’t make it anymore unusual: Treasurer Steve Grossman won the party’s formal endorsement for governor at the state Democratic convention in Worcester.

“The overwhelming frontrunner, according to the polls, was rejected by 75 percent of delegates in that convention hall," Grossman said. "You can’t be governor of Massachusetts without having that army of activists behind you.”

Attorney General Martha Coakley, the frontrunner in the polls by double digits, came in second. It was surprising just how badly she did. She almost scored the same as Don Berwick, who has never run for office before.

In her speech to the convention, Coakley said she understood the disappointment Democrats felt after her stunning loss to Scott Brown in 2010.

“The 2010 Senate election was very painful for a lot of people in this room," she said. "I understand how much of your heart and soul was in that race. Mine too."

But she promised to work hard to defeat Charlie Baker, the presumptive Republican nominee.

“No one will knock on more doors, make more phone calls, shake more hands than me in this race,” she said.

Eric Headley, a delegate from West Springfield, was unconvinced.

“For her to have lost the last election in the fashion that she did, based on her complacency, I still see that being a factor right now in her general attitude and the troops she’s got in this room,” he said.

Headley said he changed his vote from Coakley to Grossman when he saw that Grossman had clearly put in the time and the money to come out on top in this convention.

Richard Peck, another delegate from Western Mass, also voted for Grossman. He said this time around, as in 2010, Coakley just isn’t doing the legwork.

“If you come from western Mass., as we do, you appreciate when someone out in Boston comes out our way and pays attention to us," he said. "And Steve Grossman’s been doing that for years.”

Berwick, who nearly tied with Coakley, is a former health care executive who has positioned himself as the progressive in the race. He’s the only candidate to support single payer health care and oppose casinos.

Berwick said the results of the convention were a validation of his liberal viewpoints.

“This is a state ready for a very bold set of goals,” Berwick said.

Peter Ubertaccio, a political science professor at Stonehill College, called Berwick’s approach very strategic.

“There’s always been a strong progressive wing in the democratic party," Ubertaccio said. "But they really have become more powerful in the last couple of cycles, and he went after them relentlessly.”

Ubertaccio says if anything, the convention results underscore the unusual disparity between the choice of the party activists and the early choice of the electorate.

“The frontrunner outside the convention hall is not the frontrunner inside the convention hall and apparently not even close.”

Ubertaccio thinks it reflects Coakley and Grossman’s different career trajectories.

“She’s a prosecutor," he said. "Grossman is a party man, and that has allowed him to get to know people in this convention hall in a different capacity than she has.”

But now Grossman has to appeal to a broader group of voters in the primary. And he’s signaling that he’ll do it by going after Coakley.

“Martha Coakley is the overwhelming frontrunner," he said. "And I’ve got to play catch up ball with her.”

In the coming months, voters will likely see a lot of ads on TV and some sharp attacks as the Democrats gear up towards their most competitive primary in years.