Ayanna Pressley Stuns Capuano in Massachusetts House Race in Upset for Insurgents

She argued that the needs of the district – the only one in Massachusetts where a majority of residents are people of color — had changed over time and that the overwhelming “hate” coming from the White House required more than simply voting the right way. Battling President Trump and overcoming economic and racial inequities of longstanding required an entire movement, she said, suggesting she was better positioned than Mr. Capuano to spearhead that effort with what she called “activist leadership.”

Moreover, she argued that her life experience — her father struggled with drug addiction and was incarcerated for most of her youth, and she is a survivor of sexual assault – better prepared her to help people who have lived through trauma and other struggles. Perhaps the defining line of her stump speech was this: “The people closest to the pain should be closest to the power.”

Mary MacDonald, 49, a biotech researcher who voted for Ms. Pressley in Cambridge, said Ms. Pressley “represents a perspective that Congress is lacking and that resonates with me. As a woman of color, she understands my concerns, as a lesbian. Capuano has done a great job for the district, but he doesn’t get it.”

Mr. Capuano, who had not faced a serious challenge since he first won the seat in 1998, conceded he was out of practice in confronting a competitive race, or, as he told WGBH, “there was some rust on the machinery.”

Nonetheless, he quickly lined up a formidable array of establishment endorsements. They included not only Mr. Walsh, but Representative John Lewis, the civil rights icon, and former Massachusetts Governor Deval Patrick; both are black, which seemed to undercut Ms. Pressley’s argument that she better reflected the district.

But Ms. Pressley was not without her backers. Most notably, she had the support of Maura Healey, the state’s popular attorney general, who had also bucked the establishment when she won her race in 2014, as well as Michelle Wu, the first woman of color to serve as president of the Boston City Council.

The fact that the state’s two Senators – Ms. Warren and Edward Markey – remained neutral in the race was seen as a win for Ms. Pressley.