A senior Labour MEP has refused to rule out backing an independent Scotland if it becomes the best option for securing the country's links with Europe.

David Martin, who is the UK's longest serving Member of the European Parliament, said that the result of last week's referendum had left Scotland in a "sub-optimal position".

READ MORE: Nicola Sturgeon claims success on EU mission despite French and Spanish opposition

While the UK as a whole voted to leave the European Union, 62% of Scots voted to stay, a result which prompted First Minister Nicola Sturgeon to say another independence referendum is "highly likely".

Mr Martin, a Labour MEP since 1984, stressed that independence "is not my position", but added that at the moment it was impossible to judge what the best arrangements for Scotland would be.

When asked about Scotland's relationship with the EU, he said "the consequence of last Thursday's vote is we are in new territory" and that things "will be different".

READ MORE: Nicola Sturgeon claims success on EU mission despite French and Spanish opposition

Mr Martin told BBC Radio Scotland's Good Morning Scotland programme: "It's a question of whether, and it's not my position, of whether we have to move towards independence to ensure our best relationship possible with Europe or whether we can find a solution while remaining inside the United Kingdom but still keeping as much of the benefits of the European Union as possible.

"Clearly, as the First Minister has rightly said, that was the majority view of the Scottish people, that they wanted to remain part of the European Union, they saw the benefits coming to Scotland from the European Union and they want to retain those benefits."

READ MORE: Nicola Sturgeon claims success on EU mission despite French and Spanish opposition

Asked if he could back independence for Scotland, Mr Martin said: "That's a decision that could not be made at the present time, until we know the conditions for the UK exit it's impossible to judge whether Scotland within the United Kingdom is best placed or otherwise.

"We do a lot of trade with the European Union, we have a lot of connections with the European Union, but also we still do something like 40% to 45% of our trade with England and Wales and that's a market we wouldn't want to cut ourselves off from either

"It's not dodging the question but really we have to wait and see the landscape in a year, two years' time."

On the question of independence, he added: "I'm certainly not ruling it out."

Mr Martin's comments come after Mr Sturgeon on Wednesday spent the day in Brussels, speaking to European leaders, including European Parliament president Martin Schulz and European Commission president Jean-Claude Juncker, who she said had given her a ''very sympathetic response''.

But other European leaders have poured cold water on the idea of Scotland joining the EU after the UK voted for Brexit.

Spanish prime minister Mariano Rajoy told reporters at the European Council summit in the Belgian capital: ''If the United Kingdom leaves, so does Scotland.

''Scotland has no competences to negotiate with the EU. The Spanish Government rejects any negotiation with anyone other than the United Kingdom."

But Mr Martin said he did not think these comments would put an end to Ms Sturgeon's negotiations.

The Labour politician said that the Spanish leader was "stating a fact that at the moment that the United Kingdom is the member state of the European Union and it's for the United Kingdom to launch article 50 and then for negotiations to begin".

Mr Martin added: "I don't think Nicola Sturgeon, and I can't speak for her obviously, was in Brussels to negotiate an independent Scotland, she was here starting to test the water to see how Scotland can get the best possible solution out of a frankly sub-optimal situation."