Theresa May has said she will listen to any options the Scottish Government brings forward for Scotland having a different relationship with the EU.
The Prime Minister travelled to Edinburgh on Friday for a meeting with Nicola Sturgeon.
Mrs May said she wanted the Scottish Government to be involved in negotiations on the UK's exit from the EU.
The visit, at Bute House, was the one of the first of Mrs May's premiership. She described the meeting as "constructive and positive".
Mrs May also said she will not trigger Article 50, the formal process of leaving the EU, until a "UK approach" has been agreed.
Ms Sturgeon said she was "pleased" at the Mrs May's commitment to listening to the Scottish Government's options but said it would be "inconceivable" for any Prime Minister to block a second referendum on independence.
Asked if Scotland could have a different relationship with the EU than the rest of the UK, Mrs May said: "I want to get the best possible deal for the United Kingdom out of our negotiations for the UK leaving the EU but I'm willing to listen to options.
"I've been very clear with the First Minister today that I want the Scottish Government to be fully engaged in our discussions and our considerations, and I will listen to any options that they bring forward."
Asked if she would authorise a second independence referendum, she said: "I think the question is: should there be another referendum?
"As far as I'm concerned the Scottish people had their vote, they voted in 2014, and a very clear message came through, both the United Kingdom and the Scottish Government said they would abide by that.
"We now have the challenge though, as a United Kingdom, to ensure that we can get the best possible deal for the whole of the United Kingdom from the EU negotiations when the UK leaves the EU."
She added: "I have already said that I won't be triggering Article 50 until I think that we have a UK approach and objectives for negotiations.
"I think it is important that we establish that before we trigger Article 50."
Speaking after the meeting, Ms Sturgeon: "I was very pleased that Theresa May said that she was absolutely willing to consider any options that the Scottish Government now bring forward to secure Scotland's relationship with the European Union, and that the process that now takes shape by the UK Government will be open and flexible and that the Scottish Government will be fully involved in that."
She reiterated her position that the UK Government should not block a second referendum on independence if the Scottish Parliament votes for one.
Ms Sturgeon said: "I think it would be inconceivable for any Prime Minister to stand in the way of a referendum if that's what the Scottish Parliament wanted."
She added later: "The Prime Minister and I have big political disagreements but we are both women who approach business in a similar way, so I think we can have a good working relationship not withstanding those political differences."