Freedom of movement: why it's central to the Brexit negotiations
It is generally expected that the UK Government's determination following the UK vote to leave the EU in June 2016 to introduce controls on the ability of EU nationals to live and work in the UK will be the central point of dispute in the framing of a new trading relationship between the EU and the UK. The reason for this is that freedom of movement of people is one of the four founding principles of the EU and the single market and is not something which can be traded away against trade principles or pressures alone.
Economic rationale for freedom of movement
There are both economic and legal underpinnings to freedom of movement. In economic terms , the factors of production should be mobile across a single market. When firms are better able to compete and capital can flow freely to where it is most efficiently used, people need to be able to move to where the jobs are.
In a Europe where languages and cultures vary greatly, moving to another country can pose significant challenges, but once a person has decided to move, legal and administrative barriers should facilitate rather than obstruct such movement.
In 2008, 1% of the EU15's population moved within their country of residence and 0.1% moved to another EU15 country. The South-to-North flow of people remains limited in the 21st century (it was much more pronounced in the early days of the EU, although it is important to note that there has been a significant move of e.g. Spanish nationals to Scotland following the 2008 recession ).
But there is a more pronounced East-to-West flow whereby citizens of the newer member states which joined in 2004 and 2007 move to the older member states. Following the 2004 and 2007 enlargements Ireland has received the highest share (2%) of foreign EU citizens as a share of the working-age population. Most EU citizens living in another EU country complement the native workforce by finding jobs in sectors where there was excess demand.
The impact on public finances overall is positive, since the average EU "mover" tends to be of working age and in employment, compared to the average native. EU "movers" are, however, over-represented in low-wage sectors and therefore on average earn lower wages than natives. The possibility to move abroad has helped to ease high unemployment rates in some of the new member states. This is helpful in the short term but may lead to a problem in the long term if the most qualified workers stay abroad for long.
It is for this reason that a crucial flanking policy of the single market is financial transfers to the poorer countries, primarily through cohesion policy and now increasingly through investment vehicles such as the Juncker Investment Plan, in order to allow them to invest in skills and jobs for the future.
Legal underpinning 
The right of free movement is enjoyed by all nationals of countries which participate in the single market, therefore including all EU Member States, the European Economic Area (EEA) states and Switzerland. All nationals of EU Member States are also European Citizens  possessing the rights of free movement and residence in the EU. Directive 2004/38/EC, known as the 'Citizen's Rights Directive' of 'Free Movement Directive' provides that all EU citizens (and EEA nationals) can enjoy free movement and residence unconditionally across the EEA for a period of up to 3 months.
To enjoy residence in another Member State beyond three months, the individual must be a national of a Member State (nationality is a matter for Member State's own law), and be either a worker, a self-employed person, an economically self-sufficient person with health insurance cover such as retired people or a student with health insurance cover and sufficient resources to support themselves, or a jobseeker who has a genuine chance of being engaged (with some limits to equal treatment in terms of access to social assistance until they become employed).
To ensure that it would not be to a person's disadvantage to exercise the right to work in another Member State Regulation (EC) 883/2004 coordinates social security across the EU. This coordination of social security preserves the right of the Member States to determine the types of benefits and the rules governing them whilst ensuring that payments into one national system is acknowledged and that different national systems are coordinated, thus protecting social security entitlements as if they had been accrued in the same Member State for the course of their working lives.
The right of free movement includes the right to be accompanied by family and the right to equal treatment or the freedom from discrimination on the grounds of nationality. This means that EU citizens and their family members living in another member state enjoy the same treatment as nationals of the host member state.
This encompasses a range of circumstances including employment and recruitment, conditions of employment and social assistance and tax advantages. This is limited, in the case of access to social security, with regard to the need to protect public finances, and EU citizens and their family must not become a 'burden' on the social assistance system of the host Member State. Recently the case law of the CJEU has stated that workers may have access to social assistance on the basis of equal treatment but EU citizens who are not economically active may not .
An important right for EU citizens and their family members is the right to permanent residence. The status of permanent residence follows five years of lawful residence in the host Member State. This means that the EU citizen or family member who achieves permanent residence is integrated fully as a member of the host Member State.
They benefit from continued protection under the equal treatment principle and from enhanced procedural safeguards against expulsion. An EU citizen with permanent residence status cannot lose these rights or the right of residence if his or her economic status changes.
Finally EU citizens also have political rights to vote and stand in local and European Parliamentary elections. So far it is only the UK which has extended these rights to regional (devolved) assemblies and Parliaments, which of course led to EU citizens registered to vote in Scotland in Scottish elections having the right to vote in the Scottish Independence Referendum in 2014 (but not of course, following the UK parliamentary franchise, in the 2016 EU referendum.)
The UK debate in and following the EU referendum
During the UK referendum campaign the Leave side focused increasingly on immigration as the key reason for "taking back control" from the EU. The content of the Leave campaign tended to muddle up issues such as the current migration crisis in Europe and the effect it might have in the UK with the rights of EU nationals as such, but the ability of the Remain side to respond was limited by the failure of the Downing Street led campaign to broaden their case to Remain from a purely economic prospectus  and to endorse direct attacks on Conservative "Leave" spokesmen.
Labour's approach to freedom of movement remained relatively fluid, with concerns about migration coming across strongly of the doorstep especially in the North of England, and some trade unionists started to campaign for restrictions to be placed on EU nationals to protect the rights of lowly paid UK workers.
The way the result was interpreted by the main UK parties after it was announced and Theresa May won the Conservative leadership made it clear that there was a strong belief that voters had wanted controls on EU migration into the UK. In her address to the Conservative Party Conference on 5 October 2015 the Prime Minister made it clear that she would include controls on EU freedom of movement in her proposals under Article 50, along with parallel measures to "take back control" including reinstating the sovereignty of British courts.
The position in Labour remains more fluid. On the one hand Jeremy Corbyn and the leadership remain attached to freedom of movement , but key Labour figures such as Yvonne Cooper, chair of the Home Affairs Select Committee, Welsh First Minister Carwyn Jones and Manchester Mayor candidate Andy Burnham, backed up by Len McLuskey of UNITE, are leading work within the party to create a "progressive" case for restrictions on freedom of movement. In pledging Labour's support for the Government's Article 50 plans (subject to a plan being prepared and presented to Parliament), Labour Brexit spokesman Keir Starmer made it clear that Labour's key single market objective was tariff free access - a long way short of guaranteeing the four freedoms and associated social, cohesion and environmental legislation and policy.
The Scottish debate on freedom of movement
In Scotland the referendum debate was less focused on immigration than was the case in England and Wales. There was a significant spillover to Scotland of media coverage of the UK debate on immigration, but the Leave campaign in Scotland put more focus on a principled case against the EU as an institution, often from a left wing perspective and focusing on key controversial policies such as the advantages to Scotland of leaving the Common Fisheries Policy.
Scottish leaders of the Remain campaign made impassioned pleas in favour of freedom of movement and the role of EU citizens in Scotland, with little of the counter arguments which were virulent in the UK debate and media coverage.
The STUC generally took a position of explaining the benefits of social rights in Europe  and noted that problems in low paid industries could be best dealt with by effective implementation of EU and UK employment and minimum wage legislation.
Following the referendum First Minister Nicola Sturgeon made guaranteeing the position of EU nationals in Scotland a key plank of her campaign to keep Scotland as close as possible to Europe to respect the 62% Scottish vote to remain in the EU.
There are serious questions to be asked about whether this difference in the political debate accurately reflects public attitudes on migration in Scotland compared with other parts of the UK. In his commentary on British Social Attitudes 2014, Professor John Curtice noted that the difference tended to be a matter of a few percentage points and that on most immigration issues Scottish attitudes tend to mirror UK views as a whole, with the highest proportion (43% compared with 52% in England) in favour of more restrictions .
These public attitudes have not in recent years, however had a significant influence on the political debate in Scotland, which remains firmly in favour of more migration. A good account of the reason for this can be found in the Holyrood interview with former First Minister Jack McConnell shortly after the EU referendum . In this he noted the importance of the Fresh Talent scheme he had launched with wide political and media support in 2005 in response to population decline, with a key role to attract and retain skilled graduates.
He said that his own, and other party leader's messaging on the benefits of diversity had been much more positive than in the rest of the UK, which had had significant impacts on the nature of the public debate in Scotland on matters such as asylum seekers. He expressed the view that most politicians of both centre right and centre left parties across Europe are paying the price for "walking away" from making the difficult decisions on migration issues.
Scottish Government proposals
The Scottish Government's proposals "Scotland's Place in Europe" published on 20 December, set out the importance of continued European Single Market membership for Scotland, and as the best outcome for the UK as a whole. It then sets out the Scottish Government's strategy for ensuring Scotland can remain a member of the European Single Market even if the UK Government chooses a different outcome, before laying out the new powers which should come to Scotland.
If the UK decides not to apply freedom of movement on the current model, the Scottish Government argues that immigration powers should be devolved to Scotland to allow Scotland to operate a full single market model on the lines of an EEA member. Free movement within the UK would continue to be facilitated by the Common Travel Area (CTA), with UK citizens continuing to have the right to live and work in any part of the UK. People living in Scotland would have the right to free movement across the EU, while people in other parts of the UK would not.
The prospect of people from other European countries with the right to live and work in Scotland seeking to use Scotland as an access route to living and working in the rest of the UK would be tackled by immigration rules applied in the rest of UK, similar to the system that applies in countries such as Canada and Australia .
There will be close scrutiny of these proposals at UK level. At present it seems that the hard line on immigration taken by the Prime Minister when Home Secretary and in particular concerns about abuse will tend to lead UK decision making to resist devolving migration powers to Scotland. In doing so it will be important to consider key reasons why any restrictions on EU freedom of movement could impact significantly on Scotland's key institutions and wider economy. In economic terms it is assumed that any controls (especially in a highly discretionary system such as the UK immigration system) will result in reductions of migration and overall loss to the economy due to the administrative cost involved in applying these controls.
EU Nationals and the Scottish economyThe first is the importance of EU nationals to key sectors of the Scottish economy. EU migrants form some one third of employment in key sectors such as food and drink, digital industries and hospitality and are key sources of highly skilled labour for sectors such as energy (they played a key role in securing high growth in the sector when oil prices were high in 2009-14). The key advantage of EU labour is its ability to move quickly without the requirement for the heavy bureaucratic processes involved in getting a visa.
It will be possible to some extent to substitute for this as domestic labour is trained up, a key priority for the Scottish Government - but it will act to reduce growth opportunities and limit productivity gains. Removing free movement for EU students and researchers will impact particularly severely on Scotland's higher education sector given the high number (16%) of academic staff from the EU. Charging fees to EU students, which would be allowed once EU law no longer applies may bring in badly needed income, but this would be offset by the loss of access to EU research grants. Scottish research bodies would also lose their leading role in many collaborative EU projects, and the benefits of student mobility and enhanced learning experiences gained through ERASMUS could diminish.
EU Nationals and Scotland's demographic challengeSecond, freedom of movement is of crucial importance to Scotland's demographic challenges and future economic growth. The Scottish Economic Strategy puts a strong emphasis on growth in the working age population in underpinning sustainable economic growth. Population growth increases the labour force and with it, the total amount the economy can produce and also increases demand for goods and services, creating business and employment opportunities.
The Government Economic Strategy (2007) included a target to match average European population growth over the period from 2007 to 2017 and migration had a key role to play in helping to ensure that this target and other performance indicators are met. The accession of Poland, Lithuania, Hungary, Estonia, Latvia, Czech Republic, Slovakia and Slovenia to the EU in 2004 resulted in an increase in migration to Scotland, with particularly large in-migration from Poland. The 2011 census showed a 4.6 % increase in the Scottish population, with a 225% increase in the number of EU born nationals living in Scotland in 2011.
In economic growth terms this approach has paid dividends; between 2010 and 2035, the Scottish population is projected to increase by 10.2% above the EU average and significantly faster than many other European countries. Within this, the working age population is also projected to increase.
Any restrictions on such migration will impact on Scotland's ability to grow its workforce and consequently on economic growth, with the likelihood that the improvements shown in Scottish economic growth in the early years of the 21st century and the provision of public services such as health and social care could go into reverse.
EU Nationals and Scotland's fiscal challengeThird, any restrictions on freedom of movement could have major implications for future tax raising and inclusive growth objectives in Scotland. The "Fiscal Framework", agreed after difficult negotiations between the UK and Scottish Governments in early 2016, sets out key rules on how the fiscal arrangements will operate, including such Barnett formula transfers as will continue after the Scottish Parliament implements the additional tax and social security powers transferred under the Scotland Act 2016 on 30 November 2016.
In particular the question of how Scotland's relatively slower population growth is dealt with was a key point of dispute that was only solved by putting off the final decision until after the next major spending review in 2021.
The expectation following the Chancellor's Autumn Statement on 23 November that lower than expected tax take across the UK by the early 2020s will lead to increasing austerity in the 2021 review can only increase the likelihood that, if income tax take falls in Scotland due to a slowdown in population growth, then the risk of the UK failing to compensate in full the Scottish Parliament can only grow, with according consequences for Scottish Government's ambitions to deliver high quality public services and inclusive growth.
 There are many good sources for the economic rationale for freedom of movement - The Fact Sheet on the Single Market prepared in early 2015 by the Swedish Board of Trade contains a very useful literature review
 A very useful summary of the legal background to freedom of movement can be found in the contribution on Free Movement, Immigration and Political Rights prepared by the Scottish University Legal Network on Europe, lead authors Nina Miller Westerby and Professor Jo Shaw
 Treaty of Maastricht
 C-333/13 Dano v Job Centre Leipzig, 11 November 2014
 December news articles showing the split in the UK Labour Party
 summarised in http://www.telegraph.co.uk/news/uknews/scotland/scottish-politics/11242539/Scotland-and-England-How-different-are-they-really.htmls
 See Anton Muscatelli in Daily Telegraph on 29 December http://www.telegraph.co.uk/news/2016/12/29/scotland-has-brexit-plan-can-keep-single-market-union/
 A fuller account of the implications of the dispute over the model to be applied to budget transfers - the UK Government's approach to the Comparable Model' (CM), based on a strict interpretation of the Barnett formula, and the Scottish Government's preference for the Indexed Per Capita (IPC) model can be found in the Institute for Fiscal Studies report https://www.ifs.org.uk/uploads/publications/wps/wp201605.pdf