In a sharp change of tone in a race that has so far been cordial, Treasurer Steven Grossman launched a broadside against Attorney General Martha Coakley, one of his rivals for the Democratic nomination for governor.

Attacking her on criminal justice issues, Coakley’s area of expertise, Grossman said she had, over the years, shifted her position on the death penalty and the “three strikes” law, questioning her liberal chops.

“Especially in a race as important as governor, Democratic voters should not — and need not — settle for a candidate whose stances on core progressive values and issues are as squishy as Martha Coakley’s,” Grossman said in a statement on Thursday. “Again and again, as this campaign unfolds, she continues to abandon the positions she has championed for years.”

Advertisement

The shift in rhetoric from Grossman marks a new phase of a primary campaign that has been polite and friendly. While the Democratic contenders have not shied away from attacking Republican gubernatorial hopeful Charlie Baker, they have held their fire against each other and often joke and laugh together at their many joint appearances around the state.

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

But polls have found Grossman — and the other three declared Democratic candidates — trailing Coakley, the most widely known, by broad margins in the primary contest. And observers say it is not surprising to see a candidate working to draw a sharper contrast with a rival, particularly as Democrats around the state are in the midst of the caucus process, the first step in statewide candidates getting the party’s nomination.

“There are still a lot of caucuses to take place. I think the Grossman people are thinking if they can sow some doubts among activists [about Coakley] . . . they might be able to do even better than originally planned,” said Peter Ubertaccio, a political science professor at Stonehill College.

But, he warned, the tactic could lead to Coakley and other candidates unleashing their own attacks against Grossman.

“Which we do,” the other moderator added before the candidates began speaking.

“No,” Coakley replied, taking the same position as the four other Democratic contenders.

Legislation known as Melissa’s Bill was often referred to as a three-strikes bill, a characterization rejected by some supporters and Governor Deval Patrick, who signed it into law in the summer of 2012.

Advertisement

Among other measures, the law says if an offender amasses three convictions for certain serious crimes, he or she is not eligible for parole.

But a Coakley spokesman said Coakley was referring to other types of crime legislation, not the Massachusetts law.

“Steve Grossman is just wrong on this issue,” said Coakley spokesman Kyle Sullivan in an e-mail. “The facts are clear on this — Martha does not support a three strikes law like those that have been passed in other states like California and Texas where the third conviction for even minor offenses could result in a life sentence. In fact, she did not support legislation in Massachusetts that would have implemented similar laws here.”

“Martha does support Melissa’s Law, which updated the existing habitual offender law,” he added.

Grossman’s campaign also criticized Coakley for changing her position on the death penalty, which Coakley opposes.

In a 2004 Globe article, Coakley, then the Middlesex County District Attorney, was described as having “formerly supported the death penalty under limited circumstances.” But the article added that she no longer favored it.

Sullivan said Coakley began opposing the death penalty in all circumstances in the early 2000s.

The Democratic caucus process began last weekend and will last about a month. At local meetings of town and city Democratic organizations, activists elect delegates who will go to the state convention in June. Those delegates, who often are aligned with a gubernatorial candidate, help determine which statewide candidates make it onto the primary ballot.

The other Democrats hoping to succeed Patrick are Donald M. Berwick, a former top Obama administration health care official; Juliette Kayyem, who served as a state and federal homeland security official and Globe editorial page columnist; and Joe Avellone, a biopharmaceutical executive.

Baker, his party’s 2010 nominee, is facing off with political newcomer Mark R. Fisher in the GOP race.