BOSTON, Mass. (WPRI/AP) — Massachusetts has a Democratic governor for the first time since 2015.

Attorney General Maura Healey has been elected governor of Massachusetts, making history as the state’s first woman and first openly gay candidate elected to the office.

Watch: Healey meets with current Gov. Charlie Baker to discuss the transfer of power (Story continues below.)

Healey defeated Republican Geoff Diehl, a former state representative who had the endorsement of former President Donald Trump. Her election returns the governor’s office to Democrats after eight years of Republican leadership under the popular Gov. Charlie Baker, who opted not to seek reelection.

Annise Parker, president and CEO of the LGBTQ Victory Fund, praised Healey for shattering the “lavender ceiling” by becoming the nation’s first lesbian governor.

“Maura is one of the most compassionate and courageous public servants in America, never backing down from a tough fight on behalf of the underdog,” Parker said. “In the face of so much hate and intolerance sweeping our nation, her win is a sign – especially to LGBTQ kids in desperate need of hope – that LGBTQ people have a place in American society and can become respected public leaders. We are confident that under Maura’s leadership, Massachusetts will reach new heights as one of the most inclusive states in the country.”

Healey and her running mate, Salem Mayor Kim Driscoll, were among three all-female governor/lieutenant governor tickets in the U.S. that began Election Day with a chance to become the first such pairing elected to lead a state.

Arkansas Republicans nominated Sarah Huckabee Sanders for governor and Leslie Rutledge for lieutenant governor. And in Ohio, Democrat Nan Whaley is running for governor with Cheryl Stephens as her running mate.

Healey was also one of two openly lesbian candidates who ran to be a governor in the country. Healey and Democrat Tina Kotek, a candidate for governor in Oregon, each began the day with a chance to become the first openly lesbian person elected governor of a state.

Healey — elected eight years ago as the nation’s first openly gay attorney general — snapped what’s become known in Massachusetts as the “curse of the attorney general.” Since 1958, six former Massachusetts attorneys general have sought the governor’s office. All failed.

Watch: Healey thanks supporters after historic victory (Story continues below.)

During the campaign, Healey pledged to expand job training programs, make child care more affordable and modernize schools. Healey has also said she would protect “access to safe and legal abortion in Massachusetts” in the wake of the Supreme Court’s decision overturning Roe v. Wade.

The 51-year-old has also checked off what she considers a series of accomplishments during her time as the state’s top law enforcement officer, including protecting students and homeowners from predatory lenders and suing Exxon Mobil over whether the oil giant misled investors and the public about its knowledge of climate change.

Healey also targeted OxyContin maker Purdue Pharma and members of the Sackler family over allegations they deceived patients and doctors about the risks of opioids.

During the campaign, the Democrat warned Diehl would “bring Trumpism to Massachusetts.” Diehl served as co-chair for former President Donald Trump’s first presidential campaign in Massachusetts and won his endorsement for governor in a state that roundly rejected Trump in 2016 and 2020.

Although Healey is the first woman in Massachusetts elected governor, she’s not the first to serve in the office. Republican Jane Swift, then lieutenant governor, became acting governor in 2001 when Gov. Paul Cellucci resigned to become ambassador to Canada. Swift was never elected governor.

Since 1991, Republicans had held the corner office at the Statehouse for all but eight years when Democrat Deval Patrick was governor.