BOSTON (AP) — Democratic U.S. Sen. Elizabeth Warren, weighing a possible White House run, defeated two challengers Tuesday, while Republican Gov. Charlie Baker won a second term in Massachusetts.

Voters in the state election also returned an all-Democratic House delegation to Washington, and approved a first-in-the-nation ballot question on transgender rights.

Another ballot initiative that would have mandated nurse staffing levels in hospitals was defeated.

Warren, who turned aside Republican state Rep. Geoff Diehl and independent candidate Shiva Ayyadurai, has seen her national profile soar as a leader of the liberal wing of Democratic Party, in part because of her frequent Twitter clashes with President Donald Trump.

For Warren, who won a second six-year term, attention will quickly turn to the 2020 election. She has promised to take “a hard look” at a presidential run.

In the race for governor, Democrat Jay Gonzalez lost to Baker, who remains popular in Massachusetts and maintained a lopsided fundraising edge.

Baker said he would continue a bipartisan approach to government that appears to have met with approval in a Democratic-leaning state.

“You told us to focus on the work, not the noise,” Baker told supporters Tuesday night. “To work across the aisle. To chase the best ideas wherever they come from. And to find common ground.”

Trump wasn’t on the ballot but has surfaced in debates.

Baker has kept his distance from the Republican president and frequently criticized White House policies. He has said he probably won’t vote for Trump if he’s on the ballot in 2020.

Warren tied Diehl to Trump. Diehl served as co-chairman of Trump’s 2016 Massachusetts campaign.

Voting Tuesday in Cambridge, Warren played down the Trump factor, telling reporters: “I try to stay focused on the issues, not on division and hate.”

Trump appeared to be a motivating factor to some voters.

Joe Robinson, a 62-year-old Episcopal priest from Cambridge, said he was driven to vote to combat the “negativity” of the Trump administration.

“I would like to see the country back at a place where conversation is respected and it’s something that we work toward, we don’t shush each other,” he said.

He voted for Warren and Democratic Rep. Katherine Clark.

Madeleine Schulman, a writer from Brookline, wanted to provide a check on Trump, whose rhetoric she called “dangerous.”

“As a woman, as a Jewish person, as a mom, I’m pretty shaken by some of the things that have gone on,” said Schulman, who voted Democratic down the ballot.

Democratic Boston City Councilor Ayanna Pressley, who made national headlines by defeating Democratic U.S. Rep. Michael Capuano in the primary, was elected without opposition on Tuesday. She will be the first black woman to serve in Congress from Massachusetts.

In the race for the state’s only open House seat, Democrat Lori Trahan, of Lowell, defeated Republican Rick Green to take the seat now held by Democrat Niki Tsongas, who is retiring after more than a decade.

Seven incumbent Democrats were re-elected: Jim McGovern, Katherine Clark, Seth Moulton and Bill Keating defeated Republican challengers, while Richard Neal, Joe Kennedy and Stephen Lynch were unopposed in Tuesday’s election.

In the nation’s first ever statewide referendum on transgender rights , Massachusetts voters supported a 2016 law that bars discrimination against transgender people, including bathrooms and locker rooms that match their gender identity.

Kasey Suffredini, a leader of the campaign, called the vote historic.

“We have shattered broken stereotypes of what it means to be transgender and debunked the myth, once and for all, that protecting transgender people compromises the safety of others,” she said in a statement.

Voters defeated a proposal that would have made Massachusetts the second state, after California, to require that hospitals put specific limits on the number of patients a single nurse can care for at one time. Hospitals that opposed the measure was too rigid and could add nearly $1 billion in health care costs.

Another ballot question, calling for creation of a citizens commission aimed at undoing the U.S. Supreme Court’s Citizens United ruling, was approved.

Also Tuesday, Democratic Attorney General Maura Healey was re-elected, as were Secretary of State William Galvin, Treasurer Deb Goldberg and Auditor Suzanne Bump, all Democrats.

(Copyright (c) 2024 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox