Boston city councilor Ayanna Pressley unseated 10-term U.S. Rep. Michael Capuano in a Democratic primary Tuesday in the latest shakeup of the House Democratic caucus by a far-left challenger.

Capuano conceded defeat to Pressley in the race to represent Massachusetts' 7th District approximately 30 minutes before The Associated Press formally called the race. With 69 percent of precincts reporting late Tuesday, Pressley had the lead by 10,682 votes.

Pressley, who is running unopposed in November, is set to become the first African-American woman elected to Congress from the Commonwealth.

Capuano is the fourth House member to lose a primary this year, along with Reps. Robert Pittenger, R-N.C.; Mark Sanford, R-S.C., and fellow 10-term Rep. Joe Crowley, D-N.Y.

The prospect of a Pressley upset had drawn some comparisons to Alexandria Ocasio-Cortez's defeat of Crowley in June. The New York democratic socialist had endorsed Pressley, as did Our Revolution, the offshoot of Vermont Sen. Bernie Sanders' 2016 presidential campaign.

However, unlike Crowley, Capuano had fiercely contested the Massachusetts race by racking up endorsements, attending debates and highlighting his consistently liberal voting record in one of the most Democratic districts in a traditionally Democratic state.

And unlike Ocasio-Cortez, a 28-year-old political neophyte, the 44-year-old Pressley has a track record in Massachusetts' halls of power. She served as former Secretary of State John Kerry's political director when he was a U.S. senator and became the first black woman elected to the Boston City Council in 2009.

Greeting voters at a Boston polling station earlier Tuesday, Pressley spoke of "the ground shifting beneath our feet and the wind at our backs."

"This is a fight for the soul of our party and the future of our democracy," she told reporters. "This is a disruptive candidacy, a grassroots coalition. It is broad and diverse and deep. People of every walk of life."

Pressley has backed Medicare-for-all and called for defunding Immigration and Customs Enforcement (ICE).

She likely was aided by the demographics of the 7th district, which cuts a north-south swathe through the city of Boston and includes portions of neighboring Chelsea, Everett, Randolph, Milton and Somerville -- where Capuano served as mayor for nine years in the 1990s.

PRO-TRUMP REPUBLICAN WINS PRIMARY TO TAKE ON SEN. ELIZABETH WARREN

State lawmakers designated the district as the first majority-minority district in Massachusetts. Just a third of the population is white, with blacks, Hispanics and Asians constituting most of the other two-thirds.

However, Pressley had bristled at the notion that race was a defining issue in her campaign.

"I have been really furious about the constant charges being lobbed against me about identity politics that, by the way, are only lobbed against women and candidates of color," she said in one debate. "I happen to be black and a woman and unapologetically proud to be both, but that is not the totality of my identity."

The contest also formed sharp divides among Boston's Democratic political and media elite. The city's mayor, Marty Walsh, campaigned with Capuano in the final days of the race. U.S. Rep. Joseph Kennedy, a grandson of former Attorney General Robert F. Kennedy, also endorsed the incumbent, calling him "a guy who won't shy away from steep odds or tough truths."

OPINION: IS THIS WOMAN THE GOP'S OCASIO-CORTEZ?

Pressley was backed by state Attorney General Maura Healey, who repeatedly has challenged the Trump administration's policies on on immigration, gun control and other issues. She also was endorsed by The Boston Globe, which called her "the future of the Democratic Party."

The last time an incumbent Democratic House member in Massachusetts lost a primary was in 2014, when Seth Moulton defeated former Rep. John Tierney, who brought significant personal baggage to the campaign.

Fox News' Gregg Re, Chad Pergram and The Associated Press contributed to this report.