The spectre of last week's surge in the vote for Ukip hung over parliament on Wednesday, as MPs debated the government's Queen's Speech which talked tough on immigration amid Tory fears of Nigel Farage insurgent eurosceptic party.
Today's speech, which set out the coalition's legislative agenda for the next year, was written before the local elections that saw Ukip capture 25% of the vote. However the headline measures outlined by the Queen were aimed at regulating migrants' access to public services.
Targeting Tory divisions over how to deal with Farage, Ed Miliband told the Commons the real reason people voted Ukip was "a deep sense that the country is not working for them".
"They see a country where things are getting worse not better," he said. "The lesson for the prime minister is you can’t out-Farage Farage Banging on about Europe won’t convince the public."
Miliband said rather than neutralising the issue of Europe as had been hoped, Cameron's promise to hold an in or out referendum had merely emboldened right-wing eurosceptic Tory MPs to demand more concessions.
"The people behind him will just keep coming back for more. A Europe referendum tomorrow. Drop same sex marriage. The demands go on and on. They will never be satisfied," he said.
"And every day he spends dealing with the problem behind him he’s not dealing with the problems facing the country."
In the wake of the local election results, some Tory MPs have suggested forming an electoral pact with Ukip in order to prevent a split in the centre-right vote that could allow Labour to win the next general election in 2015.
However former Conservative defence minister Peter Luff gently warned Cameron that he should not "appease" Ukip by pandering to their "simplistic agendas"
Miliband mocked the change of tune from Conservatives who had previously savaged the character of Ukip candidates and party members. "They used to call them clowns. Now they want to join the circus," he told MPs.
The Labour leader also criticised the planned legislation for being to thin and said while Cameron was "in office" he was not "in power".
"The country has big problems, but this Queen’s Speech has no answers," he said. "They may have legislated for five years in office, but they’re out of ideas after three."
Cameron defended the series of Bills set out in the speech, and accused Miliband of not being in control of his own party and who could not stand up to Ed Balls.
"Too weak to stand up to his shadow chancellor and too weak to stand up against welfare," Cameron said. "He is the living embodiment of a new dictum: 'the weak are a long time in politics'."
The Queen told MPs and peers that an Immigration Bill will aim to "ensure that this country attracts people who will contribute and deter those who will not".
Measures in the Bill will regulate migrant access to the NHS and ensure that temporary visitors make a contribution, prevent illegal immigrants from obtaining driving licences, introduce tougher fines for businesses using illegal labour, and require private landlords to check the immigration status of tenants.
The Bill will make it easier to remove people from the UK, limiting rights to appeal against deportation and specifying that all foreign nationals convicted of serious crimes will be removed except in "extraordinary circumstances". Legal force will be given to changes to rules announced by Mrs May to prevent the abuse of the right to family life by those seeking to avoid deportation.
Despite the hopes of eurosceptic Conservative backbenchers, there was no legislation to pave the way for a referendum on Britain's membership of the European Union. MPs are now likely to be queuing up to table their own Private Member's Bills to give legal force to Cameron's promise of a public poll by 2017.
Clacton MP Douglas Carswell told BBC Radio 4's World at One programme that he was disappointed there was no referendum legislation as there have been "briefings from Downing Street" that there might have been.
"It's a pity, its not the end of the world," he said. "It would have been a wonderful opportunity to make it clear we are not just another group of politicians, we make promises and we stick to them." The eurosceptic MP added: "It's a lack of authenticity that is the real problem for us as a party."
The immigration measures were outlined as a poll by YouGov found public concern about immigration was at highest point since June 2010.
As of May 6-7 this year, 57% ranked “Immigration” among the top three most important issues facing Britain currently, a rise of 11% compared to when the question was asked last May, around the same time as the 2012 Queen’s Speech.