Addressing his MPs at the House of Commons liaison committee yesterday, Cameron said he’d “do whatever it takes to protect the United Kingdom from a Greek influx,” should the nation leave the eurozone.

His comments have surprised a number of Tories backbenchers, as by law, nationals of the 27 countries in the EU usually have the right to work anywhere in the single market without much restriction, but Cameron confirmed ministers have reviewed the legalities of any potential barring to a member state, and he would be ready to enforce such rules.

“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,” he said. “At the end of the day, as prime minister, that is your first and foremost duty.”

He confirmed there contingency plans have been drafted for “all sorts of different eventualities,” and “the legal position is that if there are extraordinary stresses and strains, it is possible to take action to restrict migratory flows.”

Cameron’s decisions echo the sentiments of Home Secretary Theresa May, who said “work is ongoing” to hamper European immigration efforts in the face of a financial collapse, in an interview with the Daily Telegraph in May.

When pressed about emergency plans to maintain control, May said: “It is right that we do some contingency planning on this [and] that is work that is ongoing.”

Cameron’s deputy Nick Clegg has remained mostly silent after yesterday’s meeting; simply saying the Lib Dems were “monitoring the situation.”

His hesitancy to comment on border controls comes after his speech in May in Berlin, where he said: “no rational person would want to see Greece leave the euro,” and stressed it would be a “false hope” to believe any kind of exit by the country would bring economic relief to the rest of Europe.