The anti-incumbent mood sweeping the US produced electoral upsets last night for Republicans and Democrats that included the biggest win yet for the Tea Party movement and defeat for Barack Obama's candidate in midterm primaries.

Anger against Washington manifested itself in victories for outsiders and defeat for establishment candidates.

The uprising is being driven on the right by disillusionment with the Republican party for not being conservative enough. The Democrats saw a shift to the left last night, as US politics grows increasingly polarised.

Rand Paul, champion of the grassroots conservative Tea Party movement and a long shot at the start of the campaign, won the Kentucky Republican primary and will take on the Democrats for a place in the Senate in November. Paul, who was supported by the former Alaska governor Sarah Palin, won 59% of the vote, to 35% for Trey Grayson, who was backed by the former vice-president Dick Cheney and the Republican leader in the Senate, Mitch McConnell.

Primaries were held last night in four states – Kentucky, Pennsylvania, Arkansas and Oregon. It was the biggest electoral test since Obama won the White House in 2008 and provided a foretaste of the congressional midterm elections in November, when all 435 House seats will be up for grabs and 36 of the 100 Senate seats.

The biggest setback for Obama was the defeat in the Democratic primary in Pennsylvania of his chosen candidate, Arlen Specter, who has been in the Senate for three decades, most of it with the Republicans until his switch to the Democrats last year. He was defeated by Joe Sestak, a retired admiral who is to the left of Specter and who secured the support of the anti-war group MoveOn.

Democrats in Pennsylvania could not stomach voting for a politician who had been in the Republican party for so long, even though he had Obama's blessing.

"It's been a great privilege to serve the people of Pennsylvania," Specter said in his concession speech.

In another blow to incumbents, the Democratic senator from Arkansas, Blanche Lincoln, appeared unlikely to secure the 50% she would need to avoid a run-off. With 60% of the vote counted, she had 43% against 42% for Bill Halter. She was targeted by the left over her failure to support parts of healthcare reform.

The Tea Party movement, which began last year, is concerned about high levels of federal government spending, and its anger is directed at Republicans who supported bailouts for banking and the car industry.

Though still in its infancy, the Tea Party is succeeding in shifting the Republican party to the right and has already secured victories over candidates who failed to support its agenda in Florida and Utah.

Paul's is the Tea Party's biggest success to date and the candidate said last night: "I have a message. A message from the Tea Party. A message that is loud and clear and does not mince words. We have come to take our government back."

Paul, described by Palin last night as unconventional, is the son of Ron Paul, the libertarian congressman from Texas who is opposed to most federal spending.

There was some good news for Obama. In an election to the House of the Representatives, the Democrats held on to the Pennsylvania district that fell vacant with the death earlier this year of John Murtha.

Obama's support is hovering around 50%, a reasonable level for this stage of a presidency, but cynicism about Congress is pervasive in both Republican and Democratic voters.

That mood was reinforced yesterday by revelations about Richard Blumenthal, a Democratic candidate for a previously safe Senate seat in Connecticut, who is accused of lying about serving in Vietnam.

Blumenthal, the attorney general for Connecticut, was widely expected to take the Senate seat being vacated by the veteran Democrat Chris Dodd in November. That is in doubt after an investigation by the New York Times into his military record found that, contrary to public statements, he had never served in Vietnam.

Blumenthal defended himself yesterday, but he will be under pressure to stand down in favour of another Democratic candidate.He is on record as claiming he served in Vietnam, but he served only in the US in the Marine Reserve.

The Republicans have their problems too. Mark Souder, a family values conservative who represented Indiana, resigned from the House, with effect from Friday, after admitting an affair with a female aide. "I sinned against God, my wife and my family by having a mutual relationship with a part-time member of my staff," he said. "I am so shamed to have hurt those I love."