THERESA May has told MPs that Scotland will leave the European Union whether or not it becomes an independent country.

The Prime Minister seized on comments on Monday from the European Commission, which suggested that an independent Scotland would have to apply to join the EU rather than automatically remaining a member.

Commission spokesperson Margaritis Schinas said the “Barroso doctrine” continued to apply. Former commission president Jose Manuel Barroso set out the legal view that if one part of an EU country became an independent state it would have to apply for EU membership.

At Prime Minister’s Questions, May said: “Scotland will be leaving the European Union, it will leave the European Union either as a member of the United Kingdom or were it independent. It’s very clear with the Barroso [doctrine], it would not be a member of the European Union.”

She made her view clear during a clash with SNP depute leader Angus Robertson, who had previously said a deal could still be done to avert a second referendum.

First Minister Nicola Sturgeon announced her intention to stage a fresh ballot, but Robertson said the party was “currently focused ... trying to convince the UK Government to come to a compromise agreement protecting Scotland’s place in Europe”.

He recalled that when May held talks with Sturgeon last July she had “promised to secure a UK-wide approach, an agreement between the devolved administrations of Scotland, Wales and Northern Ireland and the UK Government, before triggering Article 50”.

Robertson, pressing the PM, said: “When will she reach an agreement – not discussions, an agreement – with the Scottish Government before triggering Article 50?

“The Prime Minister promised an agreement, there’s not an agreement. When will there be an agreement? Because does she not understand if she does not secure an agreement before triggering Article 50, if she is not prepared to negotiate on behalf of the Scottish Government and secure membership of the single European market, people in Scotland will have a referendum.”

May reiterated her government will trigger Article 50, to start the formal Brexit process, before the end of March, adding there would be “an opportunity for further discussions with the devolved administrations over that period”.

But she told Robertson: “He is comparing membership of an organisation we have been a member of for 40 years with our country.

“We have been one country for over 300 years. We have fought together, we have worked together, we have achieved together, and constitutional game-playing must not be allowed to break the deep bonds of our shared history and our future together.”

While the Scottish Government is planning for a second referendum between autumn next year and spring 2019, an SNP source denied reports the First Minister will attempt to get an independent Scotland into the European Free Trade Association (EFTA), which includes Norway and Iceland and participates in the single market, rather than rejoin the EU.

Callum McCaig, SNP MP for Aberdeen South, was cheered by his colleagues after asking if the UK could afford to be independent.

He said: “The UK has one of the worst performing currencies in the world, it has a trade deficit of £133 billion and a national debt approaching £1.7 trillion. Can I ask the Prime Minister, does she really believe the UK can afford to be an independent country?”

May defended the government’s economic record and also noted the UK is the sixth largest economy in the world.

Holyrood’s Brexit minister, meanwhile, has insisted a fresh referendum is now the only way of protecting Scotland from the “hardest of Brexits”.

Mike Russell said the Scottish Government had come to the view it was “hard to see” a deal being done with Westminster that would avoid another vote on leaving the UK. Russell said a prospectus for independence would be put forward by Sturgeon’s administration, adding that Scotland had a “right to reject” Brexit and “choose a different future”.

He told MSPs: “We remain open to a substantive and positive response to our papers and proposals – but it is hard to see it coming forward.”

He added that meant a referendum was now the only way to protect Scotland from the “UK’s rush towards the hardest of Brexits”.

“The damage that will be done will not be completely visible on the day after the UK leaves the EU, but bit by bit its effect will be felt – indeed some of it is beginning to be felt already with increased prices and greater economic uncertainty,” he said.

“Our job in this chamber is to find ways to mitigate such damage and, if possible, to avoid as much of it as we can. It is the belief of the Scottish Government that that can now only be done by allowing the Scottish people to make an informed choice as to the future they prefer.”

More than 113,000 people have signed a petition on the UK Government website against a second Scottish referendum, meaning Westminster must now consider holding a debate on it.