BOSTON (Reuters) - A Boston city councilor’s historic defeat of a 10-term Democratic congressman was the latest sign of a generational shift in the party that is strengthening the clout of women and minority candidates, inspired by anger at Republican U.S. President Donald Trump.

City Councilor Ayanna Pressley beat U.S. Representative Michael Capuano by a stunning 59-41 margin on Tuesday to secure the Democratic nod to represent a district including most of Boston. With no Republican challenger, she is poised to become the state’s first black woman in Congress.

Pressley joins a growing slate of minority women Democrats running in the Nov. 6 congressional elections, including New York’s Alexandria Ocasio-Cortez, who scored a similar upset over a longtime incumbent, and Minnesota state Representative Ilhan Omar, set to become the first Muslim woman elected to Congress.

Ideologically, Pressley’s positions differed little from her rival. They both took stances to the left of the mainstream of the Democratic Party. But her rise reflects seismic changes sweeping the party nationwide heading into November’s elections, as candidates who mirror the party’s dominant city-dwelling base outperform incumbents – a shift that some fear could deepen splits in the party.

Democrats need to pick up 23 seats to take a majority in the House of Representatives, and two to take control of the Senate, if they are to serve as an effective foil to Trump’s agenda.

Trump has angered Democrats with his comments describing some immigrants as criminals, his verbal attacks on black athletes protesting racism and a vow to overturn the Roe v. Wade decision that legalized abortion across the United States.

Pressley and other insurgents have drawn the attention of new voters whose support Democrats will need again, said María Urbina, national political director of Indivisible, a nationwide network that formed last year to resist Trump.

Balloons fall around Democratic candidate for U.S House of Representatives Ayanna Pressley at her primary election night rally in Boston, Massachusetts, U.S., September 4, 2018. REUTERS/Brian Snyder

“The party leadership will have to look at this crop of freshmen members coming in, many of whom have rejected corporate PAC money, many of whom have taken some of the boldest stances on immigration and immigrant justice, many of whom have made racial justice central to their campaigns,” Urbina said in a phone interview on Wednesday.

Pressley, 44, has embraced expanding the Medicare federal health insurance program to cover all Americans and effectively abolishing the Immigrants and Customs Enforcement (ICE) unit of the Department of Homeland Security.

She made clear in her Tuesday night remarks that she planned to push her agenda aggressively when she takes office in January.

“It is not good enough to see the Democrats back in power,” Pressley told supporters. “It matters who those Democrats are.”

The success of the insurgents could set the stage for intraparty conflict between the Democrats’ rising left and more moderate congressmen such as Ohio’s Representative Tim Ryan and Pennsylvania’s newly elected Representative Conor Lamb.

Ocasio-Cortez said the new crop of left-leaning Democrats would stick closely to their priorities, which mirror those of the minority communities they represent.

“People of all races can do that, but candidates like Ayanna and I don’t have the luxury of *not* thinking and talking about criminal justice, immigration & healthcare in ways that impact us all,” Ocasio-Cortez wrote on Twitter.

The success of left-leaning minority Democratic candidates has not been limited to federal races.

Liberal Democrats Andrew Gillum and Ben Jealous are vying to become the first black governors in Florida and Maryland, respectively, while Democrat Stacey Abrams would be the first black woman governor of any U.S. state if elected in Georgia.

Pressley defeated a similarly left-leaning incumbent, which could temper any potential discord around her arrival in Congress, said Joshua Dyck, a professor of political science at the University of Massachusetts at Lowell.

“There has been a tendency of wanting to turn this into a Democratic Tea Party,” Dyck said, referring to the fractious, populist wave of Republicans elected to Congress in 2010. “I think there is something else coming on here. You’re seeing more women, more minorities, you’re seeing the diversification of the Democratic Party.”