For Democrats in Massachusetts, running for higher office means kissing the ring of organized labor — and hoping that endorsements from the state’s most powerful unions come your way. In a tough race, union support can be pivotal — think of Elizabeth Warren’s win over Scott Brown in 2012 or Marty Walsh’s mayoral victory last year. But during the primaries, labor’s influence is more nebulous. In several races, the mantle of union champion is up for grabs.

The race for attorney general might be the most intriguing contest in the Democratic primaries. Both Maura Healey and Warren Tolman have built strong organizations and shown a natural knack for campaigning. But while the AG’s race is a dead heat, Tolman has one big advantage: Most of the state’s major unions have endorsed him. That includes the Massachusetts AFL-CIO, which just happens to be led by his brother, Steve Tolman. What’s more, Warren Tolman was just endorsed by Boston Mayor Marty Walsh — a former union leader whose victory last November was driven by organized labor. At the state Democratic convention in June — Tolman pitched himself as labor’s chosen candidate.

"My parents instilled in me the value of standing up for what you believe in, even if you’re the only one standing," Tolman said. "And that’s why I’m proud to have the support of so many of our teachers, and our tradesmen, our healthcare workers, and all of our brothers and sisters in the labor movement."

But recently, Healey told me that she can appeal to union voters, too.

"Getting into the race, I knew endorsements were going to be hard to come by," she said. "I’m running against a person whose brother is the head of AFL-CIO."

"I’m the daughter of two union members, my mom was a nurse, my dad was the head of the teacher’s union," Healey added. "I recognize the significance and importance of labor in our economy and democracy."

So does Healey think she'll get a fair share of the rank and file union vote?

"I sure hope so!" she said.

In the governor’s race, though, labor may prove less influential. Frontrunner Martha Coakley, the state’s attorney general, has raked in the highest-profile set of union endorsements — and says her work as AG is a big reason why.

"I’ve always sought and worked with labor unions, even as district attorney," Coakley said. "As attorney general, it’s been important for me — my responsibility is to make sure the labor laws are enforced. But I’ll tell you one thing: I have a lot of labor support, I’m proud of that."

But one of Coakley’s two Democratic opponents, state Treasurer Steve Grossman, claims that Coakley’s bevy of endorsements isn’t as impressive as it sounds.

"No candidate receved the endorsement of the AFL-CIO," Grossman said. "They decided not to endorse because they had two really solid candidates they believed in."

Grossman has received his own share of union backing, including nods from the International Brotherhood of Electrical Workers. As he tells it, his supporters in labor know that he’s a natural ally.

"My relationship with the building trades has been strong," he said. "I’ve chaired the Mass. School Building Authority and shown an understanding of how to put working men and women back to work. We’ve helped create almost 10,000 jobs per year in the last 10 years."

And then there’s the third Democrat in the race, Don Berwick, who ran Medicare and Medicaid for President Obama. When it comes to formal union endorsements, Berwick has come up short. But he insists that any supporter of organized labor can cast a vote for him in good conscience.

"Organized labor’s important to our state and to our future," Berwick said. "I’m for strengthening labor, not weakening it. Too many people are being left out of the economy; they don’t have a chance to have their voices heard, and they’re being left behind economically. There aren’t that many voices that stand up for the working poor more than labor."

All of which means that on Primary Day organized labor may not be destined to play kingmaker in the Democratic governor’s primary. Like the AFL-CIO, Walsh hasn’t endorsed any of the three Democrats running. But Walsh promises that come November – labor will flex its political muscle.

"In the final, when there's a Democratic nominee, if labor gets behind that Democratic nominee, they're certainly a powerful force," he said. "They proved it in the governor's re-election campaign, they proved it in Elizabeth Warren's campaign, they proved it in Sen. Markey's campaign — and they had a little bit to do with mine as well."

And that’s a rare instance of political understatement.

Watch the Greater Boston segment: