Labour was feeling the first tremors of the Ukip political earthquake as Nigel Farage's surge prevented Labour from making its expected gains and weakened its grip in some of its northern heartlands.

Ukip polled more than a third of the vote in wards in big cities, such as Sunderland, Birmingham and Hull, where it previously had little or no presence. In Labour target seats further south and east, such as Portsmouth, a strong Ukip vote was destroying the party's hopes of making more than 400 council gains.

The Labour group leader in Portsmouth, John Ferrett, admitted Ukip's performance was "causing mayhem". The party also suffered a major blow in a key election battleground after the Conservatives held on to Swindon council, days after Ed Miliband embarrassingly failed to recognise the name of the party's group leader in the borough.

But the man in question, Jim Grant, insisted that Miliband's gaffe had not had an impact on Labour's disappointing showing in the Wiltshire town.

"That's a big media event, I don't think it has affected what has happened here. I'm a big fan of Ed but we've all got to work harder to get our message across."

Labour had hoped that the council would at least slip into no overall control. In fact, the Tories ended up with 30 seats to Labour's 23 and the Lib Dems four.

There were also signs that Ukip was doing well east of London, in places such as Basildon and Castle Point, confirming Farage's claim that he can inflict unpredictable damage to the main parties across England, so leaving them less than a year to win the electorate back before a first-past-the-post general election.

Both the Conservatives and Labour will have to think deeply about whether they can win back the Ukip vote, with some rightwing Tory backbenchers urging Cameron to think how they can reunite the centre-right through some form of Ukip-Tory pact.

Early results this morning indicated Miliband will face intense criticism over the next 48 hours, including over his personal performance and his appeal to working-class voters. The inquest will focus on whether his campaign strategists realised early enough that Ukip posed a threat to Labour as much as to the Conservatives.

It was notable that Labour was being pushed back in Rotherham where a local MP John Healey has long been pressing the party leadership to realise the threat Ukip poses to a disillusioned former Labour working-class vote. Both Labour's leader and deputy leader lost their seats in Rotherham, as Ukip gained nine seats overall and became the official opposition.

Labour MP Graham Stringer, a longstanding critic of party leaders, issued a savage attack on the quality of the Labour campaign saying it was "unforgivably unprofessional", and asked why his aides had been unable to tell Miliband the price of bread.

The Lib Dems began bracing themselves for a poor performance, in a sign of how the burden of pain is being shared across Westminster. The business secretary, Vince Cable, admitted it was going to be a difficult night for the junior party in the coalition.

He said the Lib Dems would take a "kicking" for being in government as he appeared to distance himself from Nick Clegg by saying that the party leader had decided to focus the Lib Dem campaign on the EU. Speaking on Sky News the business secretary said: "The European elections – the party leader took the gamble of fighting a European election on the issue of Europe which is a very unusual thing to do in the UK. We'll see."

Cable said that all the main parties would suffer poor results. But he added: "We are in government. We take a kicking for the things that government does that are unpopular. It does reflect on us."

He said that he had not been comfortable about forming a coalition with the Tories. "We put personal preferences aside and deal with it professionally … We have done massive things in government, we have risen to the challenge."

One longstanding critic of Clegg, the former Lib Dem MP Lembit Opik, called for him to go as the very first results showed the party's vote had collapsed, even though it was holding some wards in Lib Dem constituencies in Birmingham and Redcar.

Lynne Featherstone, the Lib Dem international development minister, said Ukip's "stunning success" was a protest at the dissembling of the political class. She added: "We are so guarded and so on message that we have lost our humanity. We are the whipping boy of the coalition."

The established parties will have to endure a drawn-out agony as the trickle of overnight local elections results turns into a flood, while the European election results are not due until Sunday night.

Cameron, once thought likely to face the most turbulent backbench response of the three party leaders, was increasingly confident that the Conservatives would not turn in on themselves, but would instead focus on winning the Newark byelection on 5 June, caused by the resignation of former Tory MP Patrick Mercer, in a bid an attempt to show that the Ukip bubble could be burst.

But the prime minister will have to endure the possibility that Ukip will be able to claim on Sunday night that they have achieved their main political objective of winning the poll in the European parliamentary elections.

All three main parties will require time to survey the magnitude of Ukip's long-promised political earthquake and any damage it inflicts to the foundations of three-party politics.

Labour insists that the local, and not the European, elections will be the best guide to the outcome of the general election, and the best indicator of whether they are winning in the key marginals it is targeting.

The party has been hoping to take control of at least eight councils in its key marginal parliamentary targets, but party organisers will also be drilling down into shares of the vote figures across all its 100 target seats.

Labour had an unprecedented "get out the vote" operation, and said its activists were outnumbering Tory, Lib Dem and Ukip activists by two to one. The party machine said it was on course to knock on more than 2 million doors on Thursday.

The Miliband campaign team faces the threat of a wall of criticism for failing to do more to combat Ukip, as well as questions about the uneven performances of what seemed an exhausted party leader out on the road. There are also claims that too many shadow cabinet members effectively in effect sat the elections out.

Next Tuesday, David Cameron will attend an informal heads of government meeting in Brussels, where he hopes to form an international cross-party alliance demanding that the EU commission respond to any voters' revolt against European centralisation with a new agenda that meets the demands of the electorate.