LONDON (Reuters) - Thousands of refugees could flock to Britain from France if voters decide to leave the European Union, a spokesman for David Cameron said on Monday, underlining the prime minister’s stance that an exit would hurt security.

Danish Prime Minister Lars Lokke Rasmussen (unseen) meets with his British counterpart David Cameron at the Prime Minister's Office in Copenhagen, Denmark February 5, 2016. REUTERS/Mathias Loevgreen Bojesen/Scanpix

In what critics said was the start of a “campaign of fear” to try to keep voters in the European Union, the spokesman said leaving the bloc could harm an agreement with France which allows British border guards to make immigration checks there.

At a news conference, Cameron backed up the message by saying the agreement, which puts Britain’s border inside France, such as at the northern port town of Calais, was a good deal for Britain and one he would fight to keep.

“If ... we can stay in a reformed Europe, you know what you get,” he said.

“You know that the borders stay in Calais, you know that we have a seat determining the rules when it comes to the future of Europe, you know we have that vital information whether it’s about terrorists or criminals traveling around Europe because we are part of those organizations.”

He said there were “a lot of opposition politicians” in France who would like to rip up that agreement, which would open the gates to thousands of refugees now living in Calais’ so-called “Jungle” camp in the hope of crossing to England.

“I don’t want to give people an excuse to do that.”

Earlier his spokesman said thousands of refugees could cross the Channel into England “overnight” if Britain voted to leave the European Union at a referendum, which could take place as early as in June.

Cameron has thrown his weight behind a plan by European Council President Donald Tusk to keep Britain in the 28-member bloc, saying if agreed by other EU leaders, he would have got the best deal for Britain and would campaign to stay in.

Those campaigning to leave said the latest warning had been choreographed to instill fear in voters.

“The prime minister is now resorting to scaremongering,” said Arron Banks, the co-founder of Leave.EU.

“The agreement we have to process migrants in Calais is with France, not the EU. There is no reason for this to change on leaving the EU,” he said in a statement.