Dorchester voters backed popular incumbents and sent a new, historic delegate to Congress, Ayanna Pressley, on Tuesday in a midterm election that saw national Democrats win back a majority in the House of Representatives, setting the stage for a more robust resistance to the Trump White House. Bostonians gave a big boost to potential 2020 contender and the state’s senior Senator Elizabeth Warren— who chalked up a landslide win against Trump-aligned challenger Geoff Diehl, but decided to send another, more moderate Republican— Gov. Charlie Baker— back to the corner office for a second term.

The re-election of Baker, who has been —at times— a mild critic of the president, bucked the national trend, which saw several State House flips from red to blue. The incumbent governor won a convincing mandate with roughly 67 percent of the statewide vote to Democrat Jay Gonzalez’s 33 percent, based on incomplete results. In Boston, early returns had Baker edging Gonzalez. But, unofficial results posted by the city of Boston's Election Department on Wednesday morning showed that Gonzalez won the city by 3,079 votes— still a victory of sorts for a GOP leader in the state’s lopsidedly blue capitol city.

In Dorchester, there were signs that Baker’s popularity, as illustrated in first-term polling, was confirmed at city ballot boxes. At Savin Hill’s bellwether 13-10 precinct, for instance, Baker and his running mate Karen Polito beat the Democratic ticket 648-471. In the 17-13 precinct of Lower Mills, the GOP ticket bested the Dems 399-383, while Gonzalez and his running mate took home a rare win in the other, Mattapan-centered precinct of 17-14 with a tally of 457-348.

Overall, the Democratic ticket for governor won Dorchester and Mattapan, but the Republican team of Baker-Polito was competitive. They won 14 of the neighborhood's 55 precincts, including the majority of votes cast in Dorchester's ward 16 (Neponset/Adams Corner/Fields Corner).

Baker-Polito crushed the Democratic ticket in some Dorchester precincts. In 16-12 (Florian Hall), it was a rout: 663-162.

Warren, who was tracking towards a 14-point win over Diehl in statewide results, could point to a deep advantage in Boston, where unofficial results showed her beating her Republican challenger with 76 percent of the vote to Diehl’s 19 percent. An independent candidate, Shiva Ayyadurai, barely outpaced blanks at city polling stations and brought in only 3 percent of the vote statewide.

Diehl won a single precinct in Dorchester: Florian Hall's right-leaning 16-12 precinct at Florian Hall, where he outpaced Warren, 458-354.

A virtual certainty since her primary upset of Rep. Michael Capuano, voters on Tuesday also confirmed Ayanna Pressley’s election as the next delegate in the 7th Congressional district and the first woman of color to represent the state in Congress. Pressley began her election day voting with her husband Conan Harris at their polling location: the Adams Street library branch (16-8) before later joining volunteers in a canvass operation in Bowdoin-Geneva.

“I’m going to Washington,” she told reporters at that event. “I’m very humbled and honored that the diverse grassroots coalition that we built, the movement that we built, has made it possible for me to go and fight these fights in Washington, but I’m going to need partners, and the truth of the matter is that we need leaders on the state level to stave off these insults and these assaults to our democracy, to our civil rights, these rollbacks of every civil right and freedom that we have fought for and we have earned.”

Pressley launched the canvass effort out of Liz Miranda’s headquarters. By night’s end, Miranda was herself elected as the next state representative in the Fifth Suffolk district. Miranda trounced Althea Garrison, the party-shifting, perennial candidate by a margin of roughly 82 percent to 10 percent. Miranda will replace Rep. Evandro Carvalho in the legislature; Garrison, meanwhile, will take Pressley’s seat on the city council next January, a result of Garrison’s fifth place showing in the 2017 city election.

“Tonight is about us continuing to work together for our district we call home. And I’m honored to pass the torch to my friend, Liz Miranda, your next State Representative,” Carvalho told supporters at a gathering after the Fifth Suffolk race was called.

“Tonight we made history again,” Miranda said. “We had the highest turn out in the 5th Suffolk District since 1970. We showed that our community votes, we drive our democracy!”

State Rep. Evandro Carvalho with Rep.-elect Liz Miranda

Of Miranda, Pressley too had kind words.

“She is one of the incredible examples of the leaders that live in all of our neighborhoods” Pressley said on Tuesday morning, praising “her humility, her hustle, and most of all her commitment to our young people.”

Rachael Rollins will be Suffolk County’s next district attorney after steam-rolling her independent opponent Michael Maloney, a Brockton attorney who had the backing of many in law enforcement. She ultimately took the post with 81 percent of the those to Maloney’s 19. The former chief legal counsel for Massport and MassDOT, Rollins is biracial and ran on a progressive platform to come out on top of a field of five Democratic candidates in the primaries. Her election marks the first time the Boston Police and the offices of Suffolk County’s Sheriff and District Attorney will be helmed by people of color.

A ballot question that sought to set staffing limits for nurses in state hospitals went down to a resounding defeat across the state and in Boston. Those results were mirrored in Dorchester and Mattapan precincts, where voters enthusiastically backed another referendum— Question 3— to protect the rights of transgender people, which was backed by more than two-thirds of Massachusetts voters. In Dorchester, all 55 precincts that comprise parts of the neighborhood voted "yes" on Question 3. The highest-percentage win came at the Kit Clark Apartments on Dorchester Avenue, which approved the measure by 83 points. Even red-leaning Florian Hall voted yes, 53-47

Baker and his supporters gathered at the Hynes Convention Center to celebrate his sweeping win over Gonzalez. “The people of the Commonwealth like what we do and how we do it -- so much so, they gave us a big win and the rest of the night off,” Baker said after taking the stage. He promised a “collaborative, purposeful and humble approach to governing” over the next four years. “And that’s going to be non-stop, pedal-to-the-metal, let-it-rock,” Baker said.

Baker’s relative strength in the city was telegraphed at a pre-election rally in Hyde Park on Sunday, where Democrats including City Councillor Tim McCarthy, representing Hyde Park and Mattapan, and state Rep. Angelo Scaccia praised him enthusiastically.

McCarthy, a lifelong Democrat, said “It shouldn’t matter what the Rs or the Ds are. It doesn’t matter… people are talking about going the other way because we’re Democrats. That’s the stupidest thing I’ve ever heard in my entire life. If someone’s doing the job, they’re doing the job.”

Baker’s remarks followed in much the same vein.

“We’ve tried very hard as an administration not to let partisanship get in the way of moving communities and neighborhoods forward,” Baker said. “If you look at our team, there’s a lot of Democrats, Republicans and independents working in our administration because at the end of the day, this is supposed to be about the work and not what I would call the sidebar stuff.”

A notably mute voice in the general election was that of Boston’s mayor, Martin Walsh, who endorsed in certain races like Warren and Rollins, but did not weigh in on the gubernatorial race. He backed several incumbents in the primary, like Capuano and Reps. Jeffrey Sanchez and Byron Rushing, that were ousted by newer faces Pressley, Nika Elugardo, and Jon Santiago.

On whether it matters if Boston’s chief executive weighs in, Pressley said “the ultimate leader is the citizen activist, which we’re seeing rising up all around this country and certainly here in this commonwealth… the electorate is speaking up, and that’s who I’m following and that’s who I’m paying attention to.”

In her remarks on election night, Sen. Elizabeth Warren told jubilant Dems at the Fairmount Copley Hotel: “I make you this promise: we are just getting started.” She did not directly address the notion that she might run for president.

“Our government is still captured by the wealthy and the well -connected and the economy is still rigged against working people, women and communities of color,” she said. “Our Supreme Court is still packed with right-wing activists who believe that the wealthy and the well connected should get to call the shots. And Donald Trump still practices the dark art of ruling by fear, fear whipped up to turn hardworking Americans against hardworking Americans.”

On the state legislature side, most local elections were determined in the primaries, if the representatives even had challengers. Incumbent state representatives Russell Holmes, Dan Cullinane, and Dan Hunt keep their seats this year. Only Cullinane had a primary challenge, fending off a repeat opponent from Mattapan attorney Jovan Lacet.

New state representatives-elect Miranda and David Biele, in the Fifth and Fourth Suffolk posts respectively, again claimed victory in the general election. Biele takes up the mantle from state Sen. Nick Collins, who won a special election earlier this year to replace former state Sen. Linda Dorcena Forry. Collins was unopposed in the general election Tuesday.

Reports from the State House News Service and WBUR 90.9FM contributed to this article.