David Cameron said he is ready to crack down on immigration from struggling countries like Greece if the eurozone goes into meltdown.
The Prime Minister insisted contingency plans are in place and he would do "whatever it takes" to protect the UK. The comments, in evidence to the influential Commons Liaison Committee, came with fears still running high over the future of the currency union.
Asked about the danger that Britain could be seen as a safe haven for migrants if the situation worsened, Mr Cameron replied: "We obviously have contingency plans for all sorts of different eventualities. That is the right thing for a government to do when there is so much uncertainty."
Mr Cameron went on: "I would be prepared to do whatever it takes to keep our country safe, to keep our banking system strong, to keep our economy robust. At the end of the day as prime minister that is your foremost duty. I hope it wouldn't come to that but as I understand it the legal powers are available if there are particular stresses and strains."
The premier told the MPs it would be in Britain's interests for the eurozone to make the steps towards integration that would stabilise the single currency and calm the markets. But he said the most likely outcome of current efforts to deal with the crisis would be to "kick the can down the road".
He batted away calls for an early referendum on Britain's membership of the EU, urging "tactical and strategic patience".
Mr Cameron denied that banking union in the eurozone would trigger a referendum, as it would not mean any further transfer of sovereignty from the UK.
"If the 17 countries of the eurozone bring about a banking union for themselves - which I frankly think they need to do in a single currency - if they do that at the level of the 17 and we can get proper safeguards in place, then that wouldn't be a fundamental change for us," said the Prime Minister.
Mr Cameron said the balance of powers between Westminster and Brussels is not right and he wants to bring some powers back. But he admitted the idea was a major fault line with the Liberal Democrats, and there had not yet even been agreement on carrying out a review of the balance.
"Some preliminary work has been done but there does need to be proper coalition agreement before full work goes ahead," Mr Cameron said. "I think to be fair to both parts of the coalition we need to describe the balance of competencies work in the right way."