Image copyright AFP

A Scottish government minister has said he received a "sympathetic hearing" from his European counterparts over Scotland's bid to remain in the EU.

Farming minister Fergus Ewing said he had informal talks with other agriculture ministers in Brussels.

He said senior European officials told him that they would like to see Scotland as the EU's 28th member state.

The prime minister has said that he wants the best deal for Scotland and the UK.

Scottish Tory leader Ruth Davidson warned against "hijacking" the EU result to force an independence vote

Scotland voted by 62% to 38% to remain in the European Union, but faces the prospect of having to leave the EU regardless after the UK as a whole voted 52% to 48% for Brexit.

Potential avenue

First Minister Nicola Sturgeon has described that situation as a "democratic outrage" and has pledged to examine every potential avenue for keeping Scotland in the EU.

She has also raised the possibility of a second independence referendum - with some experts believing it would be impossible for Scotland to remain a member of both the EU and the UK after Brexit is complete.

In other developments:

Mr Ewing said he had spoken to the French, German and Irish agriculture ministers in Brussels on Monday, and had been given a "sympathetic hearing".

He added: "We had constructive talks and we are keen to continue a dialogue with those member states over the coming weeks and months."

Analysis - Sarah Smith, BBC's Scotland editor

Image copyright AP

"If you can keep your head when all around are losing theirs... you will be a man, my son" wrote Rudyard Kipling. He may have got the gender wrong but he could have been talking about Nicola Sturgeon.

In the immediate aftermath of the EU referendum result, the first minister of Scotland has seized the opportunity to make herself look like the only grown-up in the room.

Whilst Labour and Tory politicians are playing cricket, hanging out at Glastonbury or hiding away indoors Nicola Sturgeon pulled on the power heels and took charge.

Read more from Sarah Smith's blog

Mr Ewing said he was encouraged by other indications of support within the EU, adding: "Over the past 24 hours, senior officials in Europe have said they would like to see Scotland as the 28th member state."

But he declined to name any of these officials, according to the Reuters news agency.

Prime Minister David Cameron told the Commons that different parts of the United Kingdom would be involved in consultations on withdrawal from the European Union.

He added: "Scotland benefits from being in two single markets. In my view the best outcome is to try and keep Scotland in both."

The SNP's leader at Westminster, Angus Robertson, told Mr Cameron that his party had "no intention whatsoever of seeing Scotland taken out of Europe".

He added: "That would be totally, totally democratically unacceptable.

"We are a European country and we will stay a European country and if that means we have to have an independence referendum to protect Scotland's place then so be it."

Douglas Fraser analysis - Is EU associate membership really an option?

Image copyright Thinkstock

As part of the kingdom of Denmark, Greenland chose an Arctexit from the EU in 1985 while remaining tied to Copenhagen, and while Denmark remained a full member. This required a deal to be struck on access to fishery stocks.

So that's why you may have heard mention of a "reverse Greenland".

The idea seems to be that if a member state can split in such a way that one, smaller bit remains in the union and another bigger bit does not, then could that precedent be applied to Scotland within the UK, but with the bigger bit leaving and the smaller one staying?

Could Scotland's mandate for membership be respected by the Brussels institutions, giving it a new status of, say, associate membership?

Read more from Douglas' blog

Ms Sturgeon held talks over the EU referendum result with Irish president Michael Higgins in Edinburgh on Monday, and has indicated she was seeking to build "common cause" with London, Northern Ireland and Gibraltar, which also voted to remain in the EU.

Fabian Picardo, the chief minister of Gibraltar, told the BBC that one possibility under discussion was for Gibraltar and Scotland, as well as potentially Northern Ireland, to maintain the UK's membership of the bloc.

Mr Picardo told Newsnight: "I can imagine a situation where some parts of what is today the member state United Kingdom are stripped out and others remain."

The Scottish Parliament will debate the EU referendum result on Tuesday, with Ms Sturgeon asking MSPs to allow her to begin talks with officials from the UK, EU and other member states aimed at securing Scotland's position in the EU.

Labour, the Liberal Democrats and Scottish Greens have already indicated they will fully support Ms Sturgeon's motion.

But Scottish Conservative leader Ruth Davidson told BBC Scotland her party could not support Ms Sturgeon in any attempt to "hijack" the EU referendum result in order to hold another independence referendum.

She argued that people did not need further division and instability on top of that already caused by the EU vote, adding: "You don't solve coming out of one union by coming out of another."