Britain will "drift" towards an EU exit if David Cameron refuses to distinguish between refugees and immigrants, Yvette Cooper has warned.

The former shadow home secretary accused the prime minister of "playing into Eurosceptics' hands" by failing to deal with the refugee crisis on Britain's doorstep.

Cameron and Cooper are both keen to see Britain stay in Europe in the upcoming referendum, expected on 23 June. But Cooper said the PM was unwittingly encouraging a Leave vote with his rhetoric on immigration.

Speaking after a speech at the Royal United Services Institute, a defence think-tank, Cooper said: "I am worried that we will drift towards Brexit if the prime minister doesn't do more in order to be able to be part of a Europe-wide strategy to deal with the refugee crisis.

"You have to separate out immigration and asylum. The prime minister was right to talk about the issues around benefits because people see that as a fairness issue.

"But the issues around refugees are different because these are people who have no safe haven they can return to. This is a global crisis, it is not about Europe.

"That's why I'm worried that the prime minister's refusal to separate the debate about refugees from the wider debate about immigration will actually make it harder to have a sensible debate about Europe."

She warned that the PM's stance "will play into Eurosceptics' hands, they will be able to use this to build more alarm about Europe despite the fact that if we're not part of the EU it will be much harder to deal with the refugee crisis".

Louisa Gouliamaki / AFP / Getty Images

Hundreds of migrants and refugees disembark from a ferry at the port of Piraeus, Greece, on Wednesday

Cooper said she wanted Britain to accept more than the 4,000 Syrian refugees a year it has so far pledged.

And she said the government should be asking communities how many more people they could help. "If every city or county took just 10 refugee families that would enable us to take 10,000 refugees this year," she said.

Cooper backed Cameron's claim that border checks could move from France to England if Britain left the EU.

"I've spoken to senior French officials and diplomats who have said to me how much pressure they are under," she said, "particularly with the level of policing resources they need around Calais, but also the political and public pressure they are under and how much easier it would be for them if they didn't have to continue to operate those arrangements."

But she criticised his assertion that the Calais "Jungle" camp would simply pitch up in Kent. "I think what's happening at Calais would be illegal in Britain," she said. "I've met 11- and 12-year-old children who are there, that's about the same age as my kids, they're there with nobody there looking after them.

"You could not have that happen in Britain – it would be against the law to allow that to continue."