Pressley, a 44-year-old Boston City Council member with a long political résumé, was long expected to make a play for higher office. Her race against Capuano, a well-liked liberal and leading antiwar voice in his party, has created an expensive and divisive race in a seat Republicans have not contested since 1998.

AD

AD

“Some people want to snap their fingers and get whatever they want,” Capuano said in an interview after stopping by a block party organized by mothers of gun violence victims. “So do I. But I haven’t had that experience any place in my life.”

As the primary season winds to an end, with five Northeastern states voting from Sept. 4 to Sept. 13, Massachusetts’s 7th District is one of a dozen battlefields for the Democratic Party’s future.

In four of September’s five primary states — Massachusetts, Delaware, Rhode Island and New York — efforts are underway to dismantle the party establishment, starting with long-tenured politicians who first took power when compromises with the right were more routine. Democrats who are used to locking up endorsements and rolling into November are being challenged on decades-old votes, or their slowness to embrace reform, or why they haven’t been more visible in the Trump era. The same dynamic is playing out in open seats, where candidates are often debating who can provide the brightest, loudest contrast to Republicans.

AD

AD

“Anyone who represents this district is going to vote the right way on what gets to the floor,” said Andre Green, 37, a Somerville school committee member who is backing Pressley. “I want leaders who will change what actually gets to the floor.”

The Pressley-Capuano race, like most of September’s primaries, is taking place in an environment where Republicans have opted not to compete.

President Trump’s party is confident about reelecting two governors in the region, Massachusetts’s Charlie Baker and Chris Sununu of New Hampshire, the fifth September primary state. It’s cautiously optimistic about the open seat in New Hampshire’s 1st Congressional District, which was carried by Trump in 2016, and it’s ready to invest in Rhode Island’s gubernatorial contest. But most of the action is on the Democratic side.

AD

AD

In New York, primaries for governor, lieutenant governor, attorney general and the state Senate have become referendums on the leadership of Gov. Andrew Cuomo (D).

While actor Cynthia Nixon’s challenge to Cuomo has lagged in polls, activists have forced serious contests in a half-dozen Senate races. And in the race for attorney general, law professor and activist Zephyr Teachout, a 2014 Cuomo primary opponent, has risen from fringe status to the front of a four-way race. While Republicans have picked candidates for both offices, they’ve raised around $1 million apiece, less than each of the leading Democrats.

In Rhode Island, where Democrats hold every statewide office, both Gov. Gina Raimondo and Lt. Gov. Dan McKee are facing credible challengers from their left — former secretary of state Matt Brown and 28-year-old state legislator Aaron Regunberg. As in New York, the challengers have asked why a state that votes overwhelmingly for Democrats cannot pass the sort of reforms — such as same-day voter registration — that some other blue states have passed easily.

AD

AD

“I’ve fought to pass protections for working families in our state, like higher wages, like paid sick days,” Regunberg said in a debate recently. “My opponent sided with corporate lobbyists.”

And in Delaware, where Democrats only narrowly control the legislature, statewide races have been reshaped by liberal politics. A primary for attorney general has turned on a debate over whether to end “mass incarceration,” while the primary for U.S. Senate has found challenger Kerri Evelyn Harris asking whether incumbent Thomas R. Carper has answered to business interests instead of voters.

“Any old blue just won’t do,” Harris said during her sole debate with Carper.

AD

National Republicans have not targeted the Delaware race, and none of the Republicans running for Carper’s seat has raised more than $350,000 — less than one-tenth of what the party spent in 2000, when Carper knocked off an incumbent to win.

AD

In Massachusetts, the Republican governor, Baker, is heavily favored to win a second term, but elsewhere on the ballot, the president’s party is struggling to remain competitive. In four House seats, no Republican has filed to run; the Republicans seeking to challenge Sen. Elizabeth Warren (D) trail her by up to 30 points.

Democratic activists, however, have piled into races where incumbents have not faced serious competition in a decade, if ever. Rep. Richard E. Neal (D-Mass.) and Rep. Stephen F. Lynch (D-Mass.) are being challenged, respectively, by Muslim civil rights attorney Tahirah Amatul-Wadud and video game designer Brianna Wu. And longtime Secretary of the Commonwealth Bill Galvin, who heads the state’s elections system, is being challenged by Josh Zakim, a Boston legislator half his age.

AD

“We need to be willing to challenge people, even in our own party, when they’re wrong,” Zakim said in an interview after a town hall at a Somerville brewpub. “When I got into this race, he was against automatic registration. Now he’s for it. What does that tell you?”

AD

Democrats crowing about left-wing bona fides have also crowded into the race for the newly open 3rd Congressional District, which stretches between the outskirts of Boston and the state’s border with New Hampshire.

The five front-running candidates — 10 will appear on the ballot — agree that Medicare should become a universal program, that the minimum wage should be raised to $15 an hour, and that college should be tuition-free. None of the contenders is, like retiring Rep. Niki Tsongas (D-Mass.), related to a former U.S. senator. None of the front-runners is a straight, white man.

AD

That has led to a fight about something candidates cannot change — namely, whose biography would position them as the fiercest liberal advocate. Dan Koh, a former chief of staff to Boston Mayor Marty Walsh, has piled up $3 million for his first-ever political campaign. The son of a Korean father and a Lebanese mother — “the most random combination in the world,” he told supporters at one rally — Koh has argued that his roots and his record in a liberal city hall qualify him to run.

AD

“If Donald Trump had his way, I literally wouldn’t exist,” Koh said in an interview, adding that he worked to help Boston fight climate change even as Trump spurned such efforts. “Sure, people want to hear you stand up to Trump, but they want to know how you’ve done it.”

Koh’s rivals refuse to concede the biography wars. Juana Matias, a first-term state legislator, points out that she immigrated to the United States when she was 5 years old. “I don’t need to talk to anyone about these issues; I’m living them as I speak,” she said.

AD

State Sen. Barbara L’Italien reminds voters of her legislative service and adds that she is the only candidate to call for the impeachment of Supreme Court Justice Clarence Thomas. Rufus Gifford, a wealthy former ambassador to Denmark, tells audiences that he has a unique perspective on how universal health care and tough climate laws can work, but acknowledges that some voters are yearning for candidates who can reate to their life experiences.

AD

“My story, growing up as a young gay kid, feeling isolated in communities like this — that told me that I wanted to devote my life to service,” Gifford said after a house party in a wealthy neighborhood of Concord.

Despite Capuano’s best efforts, his primary also has been defined by identity, and not by his voting record. In his latest televised showdown with Pressley, Capuano looked on in amazement as the challenger said he should have blocked an effort to mollify antiabortion Democrats to get their votes for Obamacare — and said she would have opposed the law unless that was fixed.

“I have a hard time with that,” said Capuano. “We won it by one vote, and you wouldn’t have voted for it, because it’s not perfect?”

Capuano, who points out that he has a more liberal voting record than Sen. Bernie Sanders (I-Vt.), has gotten some reinforcements on the left. Antiwar groups have endorsed him because of his effort to end the war in Afghanistan, and because Pressley was unclear on whether she would undo the post-9/11 authorization of war that’s been used to justify 17 years of intervention.

As Capuano campaigned around the district, he frequently ran into people who wanted to catch up since the last time they had talked. “If someone’s fighting for you and delivering, you kind of get used to it,” Manuel Gonzales, 50, said after snapping a picture with the congressman.

Pressley, with a record in local government of her own, has argued that voters could trade one congressman who votes the right way for one who would inspire and organize them. The difference was clear in a few comments Capuano made about race, said Pressley, who is black. In a 2017 town hall, Capuano said that he disliked how “Democrats had balkanized themselves,” and that former NFL quarterback Colin Kaepernick had “turned off half of America” by kneeling during the national anthem to protest racial injustice.

The incident was a boon for Pressley, who has outpaced other Democratic challengers with endorsements from local politicians and from Boston’s major newspapers.

Last month, as Pressley marched in the city’s Caribbean parade, Mimi Jones, 70, waved from the sidelines. Pressley, she said, would get her vote over Capuano.

“I like him, I’ve voted him, he’s done a good job,” said Jones. “But we need some changes, and we need some people who look like I do.”

Clarification: An earlier version of this story said that Brianna Wu is transgender. She identifies as a woman.