A British exit from the European Union could lead to 10 years or more of damaging uncertainty while a new relationship with both the bloc and other countries is negotiated, the British government said on Monday.

Prime Minister David Cameron, who earlier this month agreed a deal with other EU leaders to reform Britain's relationship with the bloc, is campaigning for an 'In' vote in a referendum on UK membership to be held on June 23 although a number of his own ministers back a British exit.

In an document setting out the process of withdrawing from the EU, the government said leaving the bloc was unprecedented and unpredictable.

"It would take up to decade or more to negotiate firstly our exit from the EU, secondly our future arrangements with the EU, and thirdly our trade deals with countries outside of the EU, on any terms that would be acceptable to the UK," the document, published on Monday, said.

"This would be a long period of uncertainty, which would have consequences for UK businesses, trade and inward investment."

While the official government position is to back 'In', several of Cameron's top team of ministers and London Mayor Boris Johnson are campaigning for a so-called Brexit and have accused the government of scaremongering.

One of those, Chris Grayling, leader of parliament's lower house, said a post-Brexit deal with the EU would be done relatively quickly as it was in EU countries' financial interests to continue trading with Britain.

"What possible evidence is there that it will take us 10 years to sort out trading arrangements?" he told the BBC.

"We buy far more from them than they buy from us, the jobs at risk if we do not rapidly move to a new trading arrangement are in Bavaria, and in France and in Italy and in Spain ... It will be quick enough to ensure there isn't a hiatus in trading because they will lose financially if there is."