Former prime minister Gordon Brown has predicted a future referendum on Brexit.

He said the SNP, Labour and Liberal Democrats would back a public vote on the issue at a future general election if, as he expects, a transition period is extended due to no deal being reached in March.

He made the comments during a question-and-answer session which followed him giving the inaugural memorial lecture in Edinburgh in memory of late motor neurone disease campaigner Gordon Aikman.

Read more: Nicola Sturgeon: Indyref2 must wait for 'fog of Brexit to clear'

An audience member asked the former PM if he supports a so-called People's Vote on the final Brexit deal and if this should have remaining in the EU as an option.

He replied: "I believe there will be a referendum on Brexit. What I'm not sure about is when it will be."

He said if Britain leaves the EU without a deal in March 2019 but with, as he expects, an extended transition period retaining some aspects of membership, the next general election would be fought on Europe.

In this situation, he predicted, the UK would not be "wholly out" of the EU by up to 2022.

He expects general election manifestos of Labour, the Liberal Democrats and the SNP all to back a public vote on this issue in these circumstances.

"I'm pretty convinced there will be a referendum some time, " he said.

"It will in the end be the only way to sort out the problem."

He added: "The people, even though they don't like the idea of a divisive referendum, will eventually demand a final say."