Updated

Boston City Councilwoman Ayanna Pressley made history on several levels Tuesday by easily defeating 10-term Rep. Mike Capuano in the Democratic primary for the U.S. House seat once held by John F. Kennedy and Tip O’Neill. Her upset victory shook Massachusetts’ liberal political establishment to its core.

Since she faces no Republican opposition in the Nov. 6 midterm election, Pressley is assured of   becoming Massachusetts’ first African-American woman in Congress.

Capuano, who is white, was endorsed by key labor unions and the Congressional Black Caucus. Prominent African-American Democrats endorsing him included U.S. Rep. and civil right icon John Lewis of Georgia, U.S. Rep. Maxine Waters of California, and former Massachusetts Governor Deval Patrick.

In addition, Boston Mayor Martin Walsh supported Capuano. The congressman’s supporters touted his experience and his clout on the Financial Services Committee.

But primary electorates in districts where whites are now in the minority – including Capuano’s – aren’t impressed with such arguments. Pressley attracted supporters with her message that the district needs an activist progressive who will take the lead on social change.

Capuano could feel the ground shifting under him. He was criticized for having called former NFL quarterback Colin Kaepernick’s kneeling protests against perceived racial injustice and police misconduct “not productive.”

Capuano’s warnings that the Democratic Party should avoid being “balkanized” by racial identity were ignored. His support for reforming the Immigration and Customs Enforcement agency was ridiculed by Pressley, who called for abolishing ICE.

Pressley’s message was simple: “The people closest to the pain should be closest to the power.”  She showcased her history as a survivor of sexual assault and her upbringing by a single mother in a household where her father was often in jail.

Pressley’s victory, coming on the heels of democratic socialist Alexandria Ocasio-Cortez’s stunning primary upset in a congressional district in New York City in June, has given the Democratic Party’s hard-left wing the belief that history is on its side.

But Tuesday’s primary brought some sobering news as well. Two far-left female challengers to other Massachusetts Democrats were defeated after taking less than 30 percent of the vote against congressional incumbents.

Centrist Rep. Richard Neal defeated Tahirah Amatul-Wadud, an African-American Muslim and civil rights lawyer. Rep. Stephen Lynch, a relatively conservative Democrat, won over Brianna Wu, a video game developer.

The common thread in both races where the hard-left candidates failed is that while they were all outspent, their constituencies were also primarily both middle-class and non-minority.

The far-left forces in the Democratic Party can take satisfaction from their primary victories this year. Last week, leftist Andrew Gillum was able to take advantage of a divided field of moderates and win the Democratic primary for governor in Florida with 34 percent of the vote.

Earlier, left-wing African-American candidates Stacey Abrams won the Democratic primary to run for governor of Georgia and Ben Jealous won the Democratic nomination for governor of Maryland.

But with rare exceptions, Democrats on the left wing of the party haven’t been able to break out of progressive bubbles and win victories with broader-based constituencies.

On the Republican side in the Massachusetts primary, Gov. Charlie Baker was nominated to run for a second term. He will face Democrat Jay Gonzalez in November.

GOP state legislator Geoff Diehl was nominated to run for the U.S. Senate against incumbent Democrat Elizabeth Warren, who is heavily favored to win re-election. Diehl, who chaired President Trump’s 2016 campaign in Massachusetts, defeated two other Republicans in the primary.