The Democratic congressman Wesley Bell won his primary in the St Louis area on Tuesday, ending the progressive former representative Cori Bush’s bid for a comeback and blunting the momentum pro-Palestinian candidates have shown in recent elections.

Bell unseated Bush, a democratic socialist who opposes aid to the US ally and accuses it of committing a genocide in Gaza, in the Democratic congressional primary two years ago with the help of millions of dollars in spending from pro-Israel groups. Their rematch this year came amid a spate of primary defeats of Democratic incumbents at the hands of progressive outsiders.

Shortly after polls closed, the Associated Press declared that Bell had prevailed. The district’s heavily Democratic lean makes Bell the favorite to win a second term in the November election.

The United Democracy Project, a Super Pac aligned with the American Israel Public Affairs Committee (Aipac), poured about $3m into helping Bell’s campaign against Bush, who served terms in the House of Representatives after being elected in 2020 and was a member of “the Squad” of progressive lawmakers of color.

The two candidates had squared off over who would better stand up to Donald Trump and spur growth in the St Louis region, which is managing the aftermath of a deadly tornado last year.

On the campaign trail, Bell, a former county prosecutor, criticized Bush for voting against Joe Biden’s 2021 infrastructure bill, and for a comment in which she appeared to link both Biden and Kamala Harris to “fascism”. Bush said she opposed the infrastructure bill only because it did not contain spending on social services that Biden had promised, and that her words about the former president and vice-president were taken out of context.

Bush hit back by accusing Bell of having his seat bought for him by Aipac. The congressman has said he is in favor of supporting Israel while opposing Benjamin Netanyahu’s government.