Thomas Massie, the Republican congressman who voted down foreign aid packages and heavily criticised pro-Israel lobbying groups' influence in US politics, lost his primary race in Kentucky on Tuesday.

It was the most expensive US primary race of all time as outside groups - namely pro-Israel political action committees - poured millions of dollars into anti-Massie ad campaigns to oust him from Washington.

"Congratulations to US Navy SEAL Ed Gallrein for defeating anti-Israel incumbent Thomas Massie!" the American Israel Public Affairs Committee (Aipac) posted to X on Tuesday.

"Pro-Israel Americans are proud to back candidates who support a strong [US-Israel] alliance and help defeat those who work to undermine it. Being pro-Israel is good policy and good politics!"

68-year-old Gallrein, who has never held elected office before, will now be the Republican candidate for the House of Representatives in Kentucky's 4th District, come November's midterm elections.