Negotiations for Britain to leave the European Union could last a whole decade, the former head of the civil service has said.

Gus O’Donnell argued it would be “highly unlikely” that a withdrawal would follow the timetable set out in EU rules.

“I'm in that camp that doesn't think we can do it in two years,” the former cabinet secretary told BBC Radio 4’s Today programme.

“We have to negotiate our entry to the single market, we have to negotiate our future relationship with the EU and then we have to negotiate our trade treaties with all other countries. So there's a lot to be done."

Asked how long it could take for the UK to put together such a deal, Lord O'Donnell cited a Cabinet Office document which warns of “a decade or more of uncertainty”.

Such a timescale would likely see at least two general elections pass during negotiations – and possibly a change of government, where elected parties might take different views on whether to leave the bloc.

What's the European Parliament ever done for us? Show all 5 1 /5 What's the European Parliament ever done for us? What's the European Parliament ever done for us? A cap on the amount of hours an employer can make you work The Working Time directive provides legal standards to ensure the health and safety of employees in Europe. Among the many rules are a working week of a maximum 48 hours, including overtime, a daily rest period of 11 hours in every 24, a break if a person works for six hours or more, and one day off in every seven. It also includes provisions for paid annual leave of at least four weeks every year Getty Images What's the European Parliament ever done for us? Helping the people of Britain to avoid smoking In 2014 MEPs passed the Tobacco Products Directive strengthening existing rules on the manufacture, production and presentation of tobacco products. This includes things like reduced branding, restrictions on products containing flavoured tobacco, health warnings on cigarette packets and provisions for e-cigarettes to ensure they are safe What's the European Parliament ever done for us? Helping you to make the right choices with your food Thanks to the European Parliament, UK consumers have access to more information than ever about their food and drink. This includes amount of fat, and how much of it is saturated, carbohydrates, sugars, protein and so on. It also includes portion sizes and guideline daily amount information so people can make informed choices about their diet. All facts must be clear and easy to understand What's the European Parliament ever done for us? Two year guarantees and 14-day returns policy for all products Consumers across the EU have access to a number of rights, from things which are potentially very useful, to things which used to be annoying. For example, shoppers in the UK receive a two-year guarantee on all products, and a 14-day period to change their minds and return a purchase, these things are useful www.PeopleImages.com-licence restrictions apply What's the European Parliament ever done for us? Keeping your air nice and fresh (and safe) Believe it or not, although the situation is improving, some areas of the UK have appalling air quality. A report by the Royal College of Physicians released on 23 February says 40,000 deaths are caused by outdoor air pollution in the UK every year. Air pollution is linked to a number of illnesses and conditions, from Asthma to diabetes and dementia. The report estimates the costs to British business and the health service add up to £20 billion every year

The former cabinet secretary also argued that the French and German governments would be incentivised to make EU exit look more difficult because they were both facing anti-EU parties at their respective general elections.

France’s National Front advocates EU exit while Germany’s Alternative fur Deutschland only wants to pull only the European single currency.

Eurosceptic Conservative minister Dominic Raab told the same programme that a new deal could be produced “relatively soon”, however.

David Cameron, who is campaigning to stay in the EU, has previously described Brexit as a "leap in the dark".

Lord O'Donnell was previously the cabinet secretary between 2005 and 2011. He now sits as an independent crossbench peer in the House of Lords.