European parliament to keep Scotland office after Brexit
The European Parliament has decided to retain an office in Scotland after Brexit.
BBC Scotland understands the parliament's Edinburgh operation will stay open until at least the end of next year.
MEPs said it would provide advice to EU citizens living in Scotland and Scottish organisations seeking to maintain EU links.
The Scottish government said it hoped the office would become permanent.
The decision to keep a presence in Scotland was taken by the parliament's president, Antonio Tajani, and his senior team.
They have agreed a temporary reprieve to the end of 2020.
The Labour MEP, David Martin, said that made "absolute sense" because the UK is supposed to keep operating under EU rules during that period, if it leaves with a deal.
He said the parliament would also be aware of the political situation, where the current Scottish government seeks independent membership of the EU.
SNP MEP, Alyn Smith, said the decision "proves the active interest in what's going on in Scotland".
- UK in further push for Brexit deal with EU
- Sturgeon urges EU to retain Edinburgh office after Brexit
It is thought a decision on the longer term future of the office will be made later this year, after the European elections.
The elections, in May, will end the terms of all 70 UK members of the Brussels and Strasbourg based parliament.
The Brexit supporting MEP, David Coburn, formerly of UKIP, said the Edinburgh office was a "waste of money" and would duplicate the work of EU consulates.
- Brexit: A really simple guide
- Macron urges reforms to protect EU
- Toyota and BMW warn on no-deal Brexit
A spokesperson for the Scottish government said: "we are pleased that the European Parliament is to retain its office in Edinburgh and hope that it will maintain a permanent presence."
The European Commission has already decided to close its office in Scotland, despite efforts by the first minister and others to keep it open.
The Commission's external affairs team will have an office in London.
The head of the Commission's office in Scotland, Graham Blythe, said he was "delighted" the European Parliament would continue in Edinburgh.
On social media, he said it was "great for Scotland to retain a direct link with the EU institutions".
The European Parliament has already confirmed it will maintain an office in London.
The UK is due to leave the EU on 29th March.
MPs will be asked to vote on the terms of withdrawal Theresa May has negotiated next week.
If the house of commons rejects the deal and a possible no deal departure, it will be asked to approve a request to delay Brexit.