Nicola Sturgeon’s hopes of negotiating a deal to keep Scotland in the EU has suffered a major setback after Francois Hollande ruled out talks and the Spanish Prime Minister said it has to leave with the rest of the United Kingdom.

Mariano Rajoy told a news conference following the European Council meeting in Brussels that the Scottish Government “does not have the competence” to negotiate with the European Union. He concluded: “If the United Kingdom leaves... Scotland leaves too.”

He was echoed by Mr Hollande, the French President, who insisted the EU will make no advance deal with Scotland. He said: "The negotiations will be conducted with the United Kingdom, not with a part of the United Kingdom.”

During a chastening visit to Brussels yesterday for Ms Sturgeon, Jean-Claude Juncker, the European Commission president, also made clear that neither he nor European Council president Donald Tusk would “interfere in the British process” by negotiating with Scotland.

A series of other member states, including Germany, also said they would not get involved in “internal” British politics.

Mr Rajoy’s uncompromising stance appears to make a second independence referendum more likely, as Ms Sturgeon has said that she will propose one if that is the “best or only way to protect Scotland’s place in the EU.”