UK law relating to internal trade
United Kingdom legislation
The United Kingdom Internal Market Act 2020 (c. 27) is an act of the Parliament of the United Kingdom passed in December 2020. Its purpose is to prevent internal trade barriers within the UK, and to restrict the legislative powers of the devolved administrations in economic policy. It is one of several pieces of legislation concerning trade that were passed following the European Union membership referendum, as after Brexit the UK is no longer directly subject to EU law.
The UK Government has stated that the legislation's intended purpose is to guarantee the continued seamless functioning of the UK's internal market, and to enshrine in law principles to ensure regulations from one part of the UK are recognised across the country. The Scottish Government has stated that the legislation is intended to introduce wide ranging constraints on devolved competence, and observed that it also authorises financial assistance by UK government ministers on devolved matters, and reserves devolved powers relating to subsidy control. They said that the intent of the bill was a "power grab", and in a report published in March 2021 said that the act is "radically undermining the powers and democratic accountability of the Scottish Parliament."
While the bill was before parliament, the Conservative MP and Minister for the Cabinet Office, Michael Gove, described the bill as a measure to preserve the territorial integrity of the United Kingdom. The devolved administrations criticised the bill for its re-centralisation of control over commerce, reversing the devolution of power in the United Kingdom.
The bill was rejected a number of times by the House of Lords. Three of the votes on the bill in the House of Lords are the three largest government defeats in the lords since 1999. Eventually, the UK government made changes to make it more flexible, and also withdrew some provisions in (relating to the Northern Ireland Protocol to the Brexit withdrawal agreement) that had attracted controversy because of their impact on the rule of law. The act was given Royal assent on 17 December 2020, some two weeks before the United Kingdom formally left the European single market.
The Welsh Government sought a judicial review of the legislation. In a hearing in April 2021, two High Court judges refused permission for a full hearing, ruling that the claim was premature in the absence of specific circumstances giving rise to the arguments raised by the Welsh Government.
Background.
The United Kingdom joined the European Communities (EC) in 1973. In 1987, the Single European Act, a treaty amendment that sought to increase European integration and establish an internal market, entered into force. This internal market, known as the European single market, was established by 1993, the same year that the EEC and related organisations were reformed into the European Union (EU).
While a member of the EU and thus part of the European Single Market, the United Kingdom helped develop and was subject to common EU-wide rules on a number of policy areas, aimed at harmonising rules and removing trade barriers between the member states. These rules governed UK trade during a period when regulatory powers became devolved in the UK and the Good Friday Agreement on the Northern Ireland peace process was reached.
According to estimates published by the European Commission, more than half of Scotland, Wales and Northern Ireland's trade is with the other parts of the UK, in both exports and imports. The majority of England's trade is outside the UK, but the rest of the UK still accounts for more than 10% of its imports and exports.
In a 2016 referendum the United Kingdom voted to leave the European Union, colloquially known as Brexit. After lengthy negotiations, it left on 1 February 2020, but under the agreed withdrawal agreement it remained a part of the European Single Market until the end of a transition period lasting until 31 December 2020.
When the transition period ended on 31 December 2020, authority over a number of policy areas held by the EU reverted to the UK. Of these the UK government identified, in an April 2020 analysis, 154 policy areas that intersect with devolved competence.
Northern Ireland.
Article 6 of the Northern Ireland Protocol, included in the withdrawal agreement in October 2019, includes reference to the notion of United Kingdom's internal market:
 ;templatestyles src="Template:Blockquote/styles.css" / ;Having regard to Northern Ireland's integral place in the "United Kingdom's internal market", the Union and the United Kingdom shall use their best endeavours to facilitate the trade between Northern Ireland and other parts of the United Kingdom, in accordance with applicable legislation and taking into account their respective regulatory regimes as well as the implementation thereof. The Joint Committee shall keep the application of this paragraph under constant review and shall adopt appropriate recommendations with a view to avoiding controls at the ports and airports of Northern Ireland to the extent possible.
History.
In October 2016, following the first meeting of the Joint Ministerial Committee for two years (and its first following the EU membership referendum), Downing Street announced the formation of a Joint Ministerial Committee on EU Negotiations (to be known as "JMC(EN)"). As well as working collaboratively on the EU negotiations, its terms of reference include "issues stemming from the negotiation process which may impact upon or have consequences for the UK Government, the Scottish Government, the Welsh Government or the Northern Ireland Executive". At its meeting in October 2017, the JMC(EN) discussed the progress being made on consideration of common frameworks and agreed the principles that will underpin that work. A key function of the common frameworks, agreed at the meeting, is to: ;templatestyles src="Template:Blockquote/styles.css" / ;enable the functioning of the UK internal market, while acknowledging policy divergence
The common frameworks are a mechanism for the UK and devolved governments to mutually agree some amount of regulatory consistency for policy areas where returning EU powers are within devolved competence. They are sector-specific and jointly agreed between the UK government and the devolved administrations.
The amendments in the enacted version of the European Union (Withdrawal) Act 2018 put in place the presumption that retained EU law, in areas of devolved competence, will remain within the remit of the devolved legislatures. That legislation allows the UK government to restrict devolved competence by way of regulations, but puts the onus on Whitehall to specify particular powers it intends to protect from modification.
In that context, the common frameworks process led to a long-running disagreement between the UK government and the devolved governments. This was particularly focused on what would happen where a common framework agreement could not be reached. The UK government argued that in such an instance they should be able to decide on regulations unilaterally for the UK as a whole. The Scottish government rejected this argument. There was dispute over whether the devolved administrations should merely be consulted on proposed legislative changes, or that such changes should require their consent.
Publication of the bill.
Following the 2019 election the UK Government said in the queen's speech, in a part titled "The Union", that they intended to "maintain and strengthen" the UK's internal market following Brexit. An analysis published by the Cabinet Office in April 2020 pointed at 18 areas where legislation might be needed for a common framework, 22 areas where agreements with the devolved legislatures were believed to be sufficient (in addition to adjustments to retained EU law), and 115 areas where there were no plans for common frameworks.
On 16 July 2020 the UK Government published its white paper for the bill, which it said would guarantee the continued seamless functioning of the UK's internal market, and enshrine in law principles to ensure regulations from one part of the UK are recognised across the country. The government started a consultation on the white paper, which ran for four weeks and finished on 13 August.
The legislation significantly constrains legislative powers of the devolved administrations both legally and practically. A primary purpose of the legislation is to restrict the capacity of the devolved institutions to use their regulatory autonomy. The UK Government claimed shortly after publication of the white paper that the legislation and related common frameworks were a "power surge" for the devolved administrations. This notion is contradicted by the body of scholarly literature published on the issue, as well as by the House of Lords Select Committee on the Constitution. The impact assessment published alongside the bill states: "The final cost of this legislation is the potentially reduced ability for different parts of the UK to achieve local policy benefits. While this legislation does not constrain the ability of different parts of the UK to introduce distinct policies, to the extent that those policies may be enforceable on a reduced number of businesses might make it harder to realise fully the benefits of those policies." Both the Welsh and Scottish governments referred to the legislation as a "power grab".
On 9 September 2020 the government published the bill. The bill explicitly included provisions that were incompatible with the Withdrawal Agreement and thus, as the government acknowledged, illegal under international law. In a written statement published on 10 September 2020, the government cited the 2017 decision of the Supreme Court in "R (Miller) v Secretary of State for Exiting the European Union" as supporting the government's position that "Parliament is sovereign as a matter of domestic law and can pass legislation which ["sic"] is in breach of the UK’s Treaty obligations."
The bill put the reservation to Westminster of the power to regulate state aid into primary legislation. It also gave UK Government formal spending powers in areas of devolved competence. This provision gives the UK Government the power to fund projects directly without the involvement of the devolved administrations.
Labour, Liberal Democrats, Scottish National Party and Plaid Cymru all opposed the bill in parliament. The Democratic Unionist Party of Northern Ireland was generally supportive, however Sinn Fein, the Social Democratic and Labour Party, and the Alliance Party all heavily criticised the original part of the bill that would have allowed the Northern Ireland Secretary of State to break the Northern Ireland Protocol.
Shortly after the bill was published there were several resignations due to its content. On 8 September 2020, Jonathan Jones resigned his job as head of the Government Legal Department owing to concerns about "the legal implications of Britain's failure to secure a post-Brexit trade deal with the EU". On 14 September, Rehman Chishti resigned his position as the Prime Minister's Special Envoy for Freedom of Religion or Belief, noting in his resignation letter that "I can't support [the] Internal Market Bill in its current form, which unilaterally break UK's legal commitments." On 16 September, Richard Keen resigned his position as Advocate General for Scotland citing concerns arising from the UK Internal Market Bill, noting in his resignation letter to Boris Johnson that he found it "increasingly difficult to reconcile what I consider to be my obligations as a Law Officer with your policy intentions". On 18 September, barrister Amal Clooney resigned as the UK's special envoy on media freedom, noting in her resignation letter that "it is lamentable for the UK to be speaking of its intention to violate an international treaty signed by the prime minister less than a year ago."
Part 5 of the bill: Northern Ireland protocol.
Some provisions in Part 5 of the bill, clauses 40 to 45, caused considerable controversy both in the UK and internationally. 
There were concerns about their impact on the rule of law. The UK government ultimately withdrew them before enactment.
Brandon Lewis, Secretary of State for Northern Ireland, told the House of Commons that the bill would "break international law in a specific and limited way", by overriding article four of the Brexit withdrawal agreement; specifically by modifying the movement, sale, certification, and oversight of products in Northern Ireland. The government said that the decision to do so was prompted by potential bans on the sale of GB agri-food products in Northern Ireland, should trade negotiations with the European Union fail. The bill was criticised by the European Union for similar reasons.
The Attorney General Suella Braverman stated the UK Government’s legal position about the possible impact of the Bill on the Northern Ireland Protocol:
 ;templatestyles src="Template:Blockquote/styles.css" / ;It is an established principle of international law that a state is obliged to discharge its treaty obligations in good faith. This