Europe has been central to the long running debate over the future of lifeline ferry services to our island communities from Barra to Bute, almost as long as the Scottish Parliament has existed.

In May the publicly owned Caledonian MacBrayne won the new £900m contract to continue operating its Clyde and Hebrides ferry network for eight years. But could that be the last time its routes are put out to tender?

Transport ministers in the SNP Scottish Government and the earlier Lib/Lab Scottish Executive, have all insisted they while they were committed to CalMac, they had no alternative to tendering its services, and the NorthLink routes to Orkney and Shetland as well.

Read more: Beyond Brexit - Uncertain future for Scotland's tourist industry

They were advised by their civil servants that European Commission regulations on state aids and marine cabotage demanded it because of the public subsidy paid to support the ferry services. This was disputed by some respected legal and academic authorities, who said there were other ways to satisfy the EU without tendering.

The RMT union also believed a legal argument could be made to Europe given other countries, including Greece and Italy, made sure that their lifeline ferry services did not go out to tender. But it went ahead. CalMac saw off the private sector challenge from Serco, which in 2012 had won the six year Orkney and Shetland contract which was worth £243m. When that Northern Isles contract ends, the UK is likely to still be in the EU.

But Brexit negotiations are unlikely to take eight years to complete, so as things stand the European Commission rules will no longer apply when CalMac's contract next comes up for renewal. The matter should be resolved long before then.

The Great Repeal Bill was announced by Theresa May at the Tory Party conference last month with her saying it would end EU law's primacy in the UK. It would convert all its provisions into UK law on the day Brexit comes into force and we depart the EU.

Read more: Beyond Brexit - Uncertain future for Scotland's tourist industry

The Prime Minister said after that there would be an opportunity to scrutinise, amend, repeal or improve any aspect of EU law for the future.

So it is possible, given the Tory Government's commitment to getting value for public money, that the tendering regulations could stay in force in UK law even after Brexit. But they might not be needed as UK competition law would hold sway after Brexit and is likely to include competition for public services, and most likely tendering.

Meanwhile if in the end the UK, remains within the single market then it has to be assumed that the state aids and maritime cabotage regulations would continue to applicable to subsidised ferry services.

Even if Scotland ultimately decides to go its own way and votes to leave the UK, it is unlikely a Scottish Government would demand an exemption from tendering as it seeks independent admission or continued membership of the EU.

Read more: Beyond Brexit - Uncertain future for Scotland's tourist industry

There are some who have been disappointed that CalMac's network has remained intact through two tendering processes and not been opened up to private sector competition for certain routes. They now believe that CalMac has little to worry about given how far ministers went to ensure it won the contract this year and in 2006/7. But things can change.