Maura Healey, an out gay attorney and political newcomer, has prevailed in a what was seen as a hotly contested Democratic primary for Massachusetts attorney general on Tuesday night. Steve Kerrigan, an out gay man, too, has prevailed and secured the Democratic nomination for the state's No. 2 spot, lieutenant governor.

If elected in November, Healey could become the first out LGBT attorney general in the United States and Kerrigan would be the first out LGBT lieutenant governor, according to the Gay & Lesbian Victory Fund.

"As an advocate, as a prosecutor, and as a civil rights attorney, you have got to make your case and you have it give it all of your heart," Healey said in her victory speech. "We have made our case tonight."

As an assistant attorney general in the Massachusetts Attorney General's Office, Healey played a key role in the state's fight against the Defense of Marriage Act, arguing against DOMA's constitutionally at the 1st Circuit Court of Appeals in 2012.

Shortly after 10 p.m., Healey's opponent, Warren Tolman, a former state senator who was viewed by some as the favorite in the race, conceded the primary race to Healey, The Boston Globe reported. With 85% of precincts reporting, Healey led Tolman by a wide margin with over 60% of the vote.

With 87% of precincts reporting, Kerrigan had 51% of the vote, well over his opponents, Leland Cheung, who had 29%, and Mike Lake, who had 20% of the vote.

Healey will go on to face Republican John Miller in the November general election, where she is favored to win.

Kerrigan will be running alongside the Democratic nominee for governor, Martha Coakley, who triumphed over her opponent, Steve Grossman, on Tuesday. In November, Coakley and Kerrigan will face Republicans Charlie Baker and Karyn Polito. It was Coakley who, as the current attorney general, had filed the challenge to DOMA back in 2009 that Healey had argued in support of at the 1st Circuit four years later.

Healey on Monday night was already moving forward, telling supporters, "We have another trial November 4."

In the congressional races in Massachusetts, U.S. Rep. John Tierney — who has served nine terms in Congress — conceded defeat to Seth Moulton in the Democratic primary. Moulton will now go on to face out gay Republican Richard Tisei in the November election, the Associated Press reported.