A post-Brexit UK-EU trade deal might take 10 years to finalise and still fail, the UK's top diplomat in Brussels has privately told the government.
The BBC understands Sir Ivan Rogers warned ministers that the European consensus was that a deal might not be done until the early to mid-2020s.
He also cautioned that an agreement could be rejected ultimately by other EU members' national parliaments.
PM Theresa May said she wanted Brexit to be "smooth and orderly".
In October, Sir Ivan, who conducted David Cameron's negotiation over the UK's relationship with the EU, advised ministers that the view of the 27 other countries was that a free trade agreement could take as long as a decade.
He said that even once concluded, the deal might not survive the process of ratification, which involves every country having to approve the deal in its own parliament.
It is also understood he suggested that the expectation among European leaders was that a free trade deal, rather than continued membership of the single market, was the likely option for the UK after Brexit.
Sir Ivan's private advice contrasts with ministers publicly insisting a deal can be done in the two years allowed by the triggering of Article 50 - the formal start of the process of leaving the EU.
Downing Street said he was relaying other EU members' views, rather than his own or the British government's.
A spokesman said: "It is wrong to suggest this was advice from our ambassador to the EU. Like all ambassadors, part of his role is to report the views of others."
By Laura Kuenssberg, BBC political editor
Just how long will it take?
The government is intent on persuading us Brexit can be done smoothly, and to time.
So the suggestion that the UK's most senior diplomat in Brussels has privately told the government that a final trade deal with the rest of the EU might not be done for 10 years, and might ultimately fail, may give rise to more nerves.
EU leaders are meeting in Brussels - and will discuss Brexit negotiations at an end of summit dinner, without UK Prime Minister Theresa May being present.
Arriving in Brussels, Mrs May was asked about the 10-year claim, but concentrated her answer on the subject of immigration, which is what the EU leaders are focusing on during a chunk of their one-day summit.
She added that a smooth UK exit from the EU was "not just in our interests, it's in the interests of the the rest of Europe as well".
International Trade Minister Mark Garnier told the Commons Sir Ivan's views were "words from interlocutors" rather than a strict definition of how long talks will take.
Dominic Raab, a former minister and a Leave campaigner, told BBC Radio 4's Today programme that Sir Ivan was "scarred by his own pessimistic advice in the past".
"It's reasonable to set out the worst case scenario for a five to 10 year period to iron out a trade deal," he said.
"The key thing is whether we maintain barrier-free trade in the meantime in which case frankly there's no problem - we leave the EU in two years we complete the free trade agreement afterwards."
Former cabinet secretary Sir Gus O'Donnell predicted negotiating a final deal would take "at least five years".
"We certainly won't have come to any final arrangements in two years' time," he told BBC Radio 4's The Westminster Hour.
"We might well get to a point where we can symbolically leave but all sorts of details will still remain to be sorted out."
Remain-backing former Labour minister and European commissioner Lord Mandelson predicted "between five and 10 years" was the most likely timescale, telling a committee of MPs that after a deal is reached on the UK's exit terms, talks on trade arrangements would be harder and take longer.
Downing Street said Thursday's meeting showed the EU was facing up to the reality that the UK was leaving.
It is expected that the other members will discuss who will the lead the EU's negotiating team in Brexit talks.
This is expected to be former EU Commissioner Michel Barnier, who is in charge of the European Commission's Brexit team.
In other Brexit developments, the House of Lords EU financial affairs sub-committee has warned that financial services firms could quit the City of London unless there are transitional arrangements, or a "Brexit bridge" to prevent them moving to New York, Dublin, Frankfurt of Paris.
And European Parliament president Martin Schulz reiterated there would be no negotiation until the UK had officially notified the EU of its departure.
Addressing the 28 EU leaders, he added: "The UK and the EU are, and will remain, closely connected and there are too many lives on the line for an erratic, quick and total separation."
He urged leaders to work towards Brexit "in a spirit of loyal co-operation", adding: "We cannot allow the Brexit process to become an emotional affair, nor should we turn it into a legal maze from which exit is extremely difficult.
"We must not feed populists' unfounded claims that the EU is the master of all evil. We must also use this moment to concretely reflect on what we want the EU to be in the future and to provide it with the necessary tools."