Britain clinched a narrow Brexit trade deal with the European Union on Thursday, just seven days before it exits one of the world's biggest trading blocs in its most significant global shift since the loss of empire.

The deal, sealed more than four years after Britain voted by a slim margin to leave the bloc, offers a way out of a chaotic finale to a divorce that has shaken the 70-year project to forge European unity from the ruins of World War II.

It will preserve Britain's zero-tariff and zero-quota access to the bloc's single market of 450 million consumers, but will not prevent economic pain and disruption for the United Kingdom or for EU member states.