The UK might end up with a "hard Brexit" by accident due to the complexities of negotiations on leaving the EU, an economic expert had warned.

Professor Anton Muscatelli, chair of First Minister Nicola Sturgeon's standing council of experts on Brexit, warned the UK is hampered by an "extraordinary weak hand" in its negotiations with the EU's 27 other member states.

The principal of Glasgow University also hit out at "misplaced optimism" over the impact Brexit would have on the economy, during a fringe event at the SNP conference in Glasgow.

He told delegates: "Article 50 was not drawn up for it ever to be used. Now it's being used, the UK Government has to play an extraordinary weak hand, which doesn't help.

"You are seeing this in some of the discussions from the EU coming back saying 'well you can't access the single market without having the free movement of people', and so on.

"My concern is that the whole process could be not only complex but could actually lead to a really sub-optimal outcome. So hard Brexit might result almost by accident as well as by design, even if there might be the possibility of negotiations to be done.

"The other issue is that if the UK Government does push for a hard Brexit, even then, having an orderly hard Brexit is actually remarkably difficult given the time constraint of the two years."

He added: "I do think that some of the optimism around that the sky hasn't fallen in is really misplaced and this is actually a really serious situation, and the problem is that given the nature of Article 50 and the negotiations it's actually going to be very difficult to pick our way through that."

Scottish Economy Secretary Keith Brown told the same event that Brexit poses a "real and genuine threat to the long-term economic interest" of both Scotland and the UK, and he compared the negotiations between the UK and the rest of the EU to "being in bed with an elephant".

But he acknowledged it would be a "dereliction of duty" for him not to look at potential opportunities afforded by Brexit, and he defended Ms Sturgeon against accusations that she is pursuing independence above all else.

He repeated comments that some businesses which were vehemently on the No side in the 2014 independence referendum are looking at the prospect of an independent Scotland within the EU.

Mr Brown said: "The First Minister has been clear, and she has been traduced by some people in other parties saying this is not what she's really intending, what she wants to do is to get the fastest, quickest route towards an independence referendum. I know that is not the case.

"It is a question of looking at what other options there are available to Scotland in terms of mitigating the worst of Brexit and maximising the opportunities of EU membership, or variations between those.

"That is genuinely being followed through and it is not the case that it is inevitable there will be a Scottish referendum, it is not the case there will inevitably be independence, but I do think many people are reassessing their view of that.

"And as hard Brexit, if that is what it is to be, hoves fully into view, then I think more and more people will be looking at that particular option."

Delegates at the conference later overwhelmingly backed a resolution stating that "if no viable solution to safeguard our membership as part of the UK exists, Scotland should prepare for a second independence referendum and seek to remain in Europe as an independent country".

Speaking in support of the resolution, Mike Russell, the Scottish Government's Brexit minister, said: "Our problem is whatever we decide there are attempts to stop us doing it.

"So we have to go into this debate and we have to go into these negotiations as a nation. We have to speak as a nation, we have to discuss as a nation, we have to act as a nation. And that is what we will do at every stage of the negotiations.

"We will not accept the arrogant assumption that we can sit in the corner while somebody else speaks on behalf of the vital interests of Scotland. That will never happen, never ever."

Scotland's External Affairs Secretary Fiona Hyslop said the resolution was "entirely consistent" with the approach the Scottish Government is taking to Brexit.

She said: "Our message is very clear. In terms of Theresa May, if you want to make Brexit Britain lead to the break up of Britain by heading for a hard Brexit, that is your choice and that is your responsibility.

"Scotland did not vote to leave the EU, the UK vote was not for a hard Brexit."

But some delegates spoke against the resolution, criticising its wording as either too restrictive or not strong enough.

Delegate Robert Martin, a Leave voter, said: "A million of my fellow Scots also voted leave amongst 17 million others.

"I don't think this motion really considers properly what our relationship with the EU and Europe is in any shape or form. It ignores totally our relationship with the rest of the UK in trading terms and therefore doesn't address the economic risks of disrupting our relationship with the rest of the UK in order to pursue a relationship with a smaller effective export market in the rest of Europe."

Referring to the comments from leading EU figures during the 2014 Scottish independence referendum, he added: "They weren't exactly putting the welcome mat out for us, they were actually trying to slam the door in our faces.

"So let's try and understand and re-examine what our relationship with the EU should be before we hang it round the success or otherwise of a second independence referendum."