David Cameron has described keeping the UK together in the wake of the vote to leave the European Union as an “absolutely paramount national interest”.
The prime minister also insisted the closest possible relationship with the EU would be the “best possible deal” for both the UK and Scotland.
His comments came as First Minister Nicola Sturgeon was in Brussels to meet European Commission President Jean-Claude Juncker.
While the overall result of last week’s referendum was in favour of a Brexit, Scots voted overwhelmingly to remain in the EU.
The discrepancy has raised the prospect of a second independence referendum, with Ms Sturgeon saying one is now “highly likely”.
At the first Prime Minister’s Questions since the poll, SNP Westminster Leader Angus Robertson asked what the UK Government would do to “protect Scotland’s place in Europe”.
Mr Cameron said the government needed to negotiate the “best possible deal for the UK and the closest possible relationship”.
He added: “That will also be the best possible deal for Scotland. That is what we need to focus on. That is what needs to be done.”
But Moray MP Mr Robertson said the PM was “wrong” to suggest the UK and Scotland’s interests were one and the same.
He pointed to the motion passed by Holyrood earlier in the week endorsing Scottish Government discussions with EU institutions and member states to explore options for protecting Scotland’s place in the EU and single market.
He added: “Every party in the Scottish Parliament voted for that except the Conservative party, which abstained. When will the Conservatives finally join all the other parties in Scotland in protecting Scotland’s place in Europe?”
The PM repeated his earlier reply, adding: “Our membership of the EU is a UK membership and that is where we should take our negotiating stance.”
Democratic Unionist Jim Shannon said the union that “really matters” is the United Kingdom of Great Britain and Northern Ireland.
He asked: “What is being done to ensure that that continues during the prime minister’s remaining time in office?”
Mr Cameron replied: “Keeping the UK together is an absolute paramount national interest for our country.
“Because of the decision that has been made about Europe, there need to be exhaustive conversations between officials in Whitehall and in Northern Ireland.”
Northern Ireland also voted Remain in the EU referendum, while Wales and England backed Brexit.