BOSTON (Reuters) - Boston City Councilor Ayanna Pressley beat a 10-term incumbent on Tuesday to win the Democratic nomination to run for the U.S. Congress, and she immediately came out swinging at President Donald Trump.

Pressley’s win was the latest in a streak of primary victories by younger, more diverse Democratic candidates against established rivals before the Nov. 6 election. Democrats need to win 23 seats to take back the majority in the House of Representatives.

The Chicago-raised activist faces no Republican rival for the district, which includes most of Boston and its neighboring cities, leaving her free to focus on Trump.

“Our president is a racist, misogynistic, truly empathy-bankrupt man,” Pressley, 44, told supporters on Tuesday night. “It is time to show Washington, D.C., both my fellow Democrats, who I hope will stand with us and Republicans who may stand in our way ... change is coming and the future belongs to all of us.”

Trump has angered Democrats with comments describing immigrants as criminals, attacks on black professional athletes protesting against racism and Twitter slaps at female politicians.

Pressley’s win echoes the June primary in a safely Democratic New York City congressional district, where first-time candidate Alexandria Ocasio-Cortez beat a 10-term incumbent, sparking enthusiasm for progressive candidates across the United States. Shortly after her win, Ocasio-Cortez endorsed Pressley.

Pressley took on U.S. Representative Michael Capuano, who had not faced a primary challenge since he was first elected in 1998. She argued that she was more attuned to the needs of the state’s only congressional district where a majority of residents are not white.

Slideshow ( 10 images )

Pressley is poised to become the state’s first black woman in Congress.

“This wasn’t a battle between a conservative and a liberal, they were both progressives in very good standing,” said Peter Ubertaccio, a professor of political science at Stonehill College outside Boston. “It does point to a generational shift and this notion that a lot of folks are not waiting their turn in the way they might have years ago.”

Polls and political analysts predict the state’s nine House of Representatives seats will remain in Democratic hands, along with the seat held by U.S. Senator Elizabeth Warren, often cited as a possible 2020 White House contender.

Governor Charlie Baker, a Republican who regularly shows up in opinion polls as one of the most popular U.S. governors, is also expected to be re-elected.

Other Massachusetts Democratic incumbents held off challengers.

Secretary of State William Galvin, 67, who has held his office for 24 years, easily beat another Boston City Council member, 34-year-old Josh Zakim.

U.S. Representative Richard Neal, the 69-year-old ranking member of the House Ways and Means Committee, now in his 15th two-year term, held off a challenge by 44-year-old lawyer Tahirah Amatul-Wadud, a Muslim who was endorsed by Our Revolution, a progressive group that grew out of U.S. Senator Bernie Sanders’ 2016 Democratic presidential campaign.

As of Wednesday morning, Lori Trahan held a 223-vote lead over Dan Koh, a former chief of staff for Boston Mayor Marty Walsh, local media reported. They were contesting a primary to run for the seat held by U.S. Representative Niki Tsongas, who is retiring after 11 years.