Maura Healey on Tuesday defeated Warren Tolman, a former state senator, for the Democratic nomination for Massachusetts attorney general. The upset puts Healey in a strong position to become the nation's first openly gay state attorney general.

Tolman conceded to Healey shortly after 10 p.m., The Boston Globe reported.

Healey, a former assistant attorney general, will face off against Republican John Miller, a lawyer, in the fall.

“Make no mistake, this is a HUGE win for our community,” Chuck Wolfe, president & CEO of the Gay & Lesbian Victory Fund, said in an emailed statement.

Stephen Peters, a spokesman for the Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, called Healey's come-from-behind victory “historic.”

The win sends “a message of hope and empowerment to LGBT citizens in Massachusetts and across the country,” he said in a statement.