David Cameron suggested he could back calls for the UK to leave the European Union yesterday as he unveiled plans to bar EU workers from receiving benefits or council housing for four years.

In one of his strongest threats yet the Prime Minister warned Brussels he could rule "nothing out" if it blacked his proposals.

The Scottish Government was understood to be poring over details of the plans last night amid concerns they could be incompatible with devolution.

In his speech Mr Cameron said: "We will introduce a new residency requirement for social housing - meaning that you can't even be considered for a council house unless you have been here for at least four years."

SNP sources suggested the exact wording of the proposals would be considered closely as powers around housing lie with Scottish ministers.

Pete Wishart, the SNP Home Affairs spokesman, said Mr Cameron's comments were "depressing and alarming".

"He has now made it explicit he is prepared to lead the UK out and that means Scotland could be removed against our will."

The SNP has called for a "double lock" that would allow an EU exit only if it was backed by a majority of Scots - as well as a majority across the UK. Previous suggestions that the UK could cap EU migrant levels were missing from Mr Cameron's speech.

The Tory leader said he had studied all the options and set out what he thought would work.

Under his plans, EU migrants would have to wait for years before they would be eligible for in-work benefits such as tax credits.

Child benefit and child tax credits would no longer be paid to those whose children live abroad.

Many of the welfare restrictions will be written into laws around the new benefits system, Universal Credit. No 10 hopes such a move will counter any challenge they discriminate against EU workers.

The Conservatives say the plans are needed to reduce so-called "pull" factors they say encourage EU migrants to the UK.

Mr Cameron is also under pressure from within his own party on immigration, following two successive by-election defeats to Ukip. Labour and the Liberal Democrats have also toughened their language on immigration in recent weeks, as both eye May's general election.

Ukip insist the UK has no control over its own borders while part of the EU. Other party leaders criticised the Prime Minister's proposals. Nick Clegg said there were "some very serious question marks" over whether some of the reforms would happen.

Labour leader Ed Miliband said Mr Cameron had "absolutely no credibility" on immigration.

Ukip leader Nigel Farage predicted the Prime Minister would fail to deliver reform.

"He's not going to win. There is absolutely no way that if he goes to Brussels, and sits around the table with 27 other heads of states, that they're going to make his demands a priority. They're simply not going to do that."