LONDON — Britain and the European Union struck a hard-fought trade agreement on Thursday, settling a bitter divorce that stretched over more than four years and setting the terms for a post-Brexit future as close neighbors living apart.
The deal, which must be ratified by the British and European Parliaments, came together in Brussels after 11 months of grinding negotiations, culminating in a last-minute haggle over fishing rights that stretched into Christmas Eve, just a week before a year-end deadline.
Despite running to thousands of pages, the agreement leaves critical parts of the relationship to be worked out later. And it will not prevent some disruption to trade across the English Channel, since British exports will still be subjected to some border checks, adding costs for companies and causing potential delays at ports.
But it is nonetheless a landmark in the long-running Brexit drama — the bookend to Britain’s departure from the European Union in January and a blueprint for how the two sides will coexist after severing deep ties built over a 47-year relationship. A failure to come to terms could have left Britain and the European Union in a bitter standoff, poisoning relations for years to come.
“It was a long and winding road, but we have got a good deal to show for it,” said Ursula von der Leyen, the president of the European Commission, the bloc’s executive arm. “This moment marks the end of a long voyage.”
Brexit began as a project to assert British sovereignty and throw off the constraints of Brussels. Fueled by anti-immigrant fervor and a belief that an independent Britain would fare better in a changing world, it became at times an insoluble riddle — how to unravel more than 40 years of ties without inviting chaos.
As the debate played out, the world shifted around Britain. Rising populists like President Trump erected barriers to trade; the pandemic put globalism on the defensive; and the victory of Joseph R. Biden Jr. in the American presidential election called the go-it-alone ethos of Brexit into question.
To allow enough time to confront these issues, Britain agreed to continue abiding by most of the rules and regulations of the European Union until the end of this year while negotiators hashed out new arrangements to govern a vast cross-Channel trade, valued at more than $900 billion a year.
If approved, the agreement will take effect on Jan. 1, four and a half years after a narrow majority of people in Britain voted to leave the European Union, plunging the country into rancorous debate and political divisions.
For Prime Minister Boris Johnson of Britain, who won a landslide election victory in 2019 vowing to “get Brexit done,” the deal allows him to fulfill that promise. He sounded triumphant when speaking shortly after the announcement. “We’ve taken back control of our laws and our destiny,” he said.
“For the first time since 1973,” Mr. Johnson said, “we will be an independent coastal nation with full control of our own waters.”
But to get there, the prime minister had to make significant concessions, especially on rules that cover state aid to businesses and European rights to continue fishing in those waters.
Britain will subscribe to “level playing field” principles, hewing closely to European Union standards and regulations for the foreseeable future. Should disputes arise, they will be settled through arbitration rather than the automatic penalties that the European Union had been demanding.
The European Court of Justice, anathema to Brexiteers, will have no role.
In fishing, the last issue to be resolved and the most politically sensitive, the sides agreed on a 25 percent reduction in quotas for European Union nations to be phased in over five and a half years. Britain had been pressing for a three-year transition, the bloc for 14 years.
The agreement does not cover services, such as London’s mighty finance sector, which account for about 80 percent of the British economy.
In a blow to young people in Britain and across Europe, Mr. Johnson said the country would no longer participate in the Erasmus exchange program, a Europe-wide program that has allowed about 200,000 students a year to travel abroad for study, work experience and apprenticeships since 1987.
In June, Mr. Johnson spurned a chance to extend the transition period for a year and warned that Britain was ready to walk away without an agreement if Brussels did not give it sufficient latitude to develop its economy free from the influence of European rule making. As late as this week, he insisted that Britain would “prosper mightily” with a no-deal exit.
That assertion got an early test over the past week when the outbreak of a rapidly spreading variant of the coronavirus in Britain prompted France to halt freight shipments for two days. That caused a large backup of trucks close to the ports of Dover in England and Calais in France, stoking fears of food shortages and empty shelves in British supermarkets.
From the start, Mr. Johnson framed the negotiations as an opportunity to assert Britain’s sovereignty in a post-Brexit world. Inevitably, though, given the European Union’s much greater size and economic muscle, its negotiators were able to insist that Britain stay aligned with the bloc in some critical respects.
Ms. Von der Leyen said the agreement would guarantee fair competition and respect for the European Union’s rules and standards. “No deal in the world can change reality and gravity in today’s world,” she said. “We are one of the giants.”
Despite the vast interests at play, and recent weeks of brinkmanship, the trade talks unfolded for the most part with less drama or visibility than the political debate that preceded them. That was partly deliberate. Mr. Johnson’s government wanted to push Brexit out of the spotlight in order to highlight an agenda of developing Britain’s industrial north.
But external events also altered the negotiating dynamic.
The pandemic ravaged Europe, preoccupying leaders and pushing Brexit off their radar screens until very late in the year. It also added to the pressure to conclude a deal, since neither side wanted to inflict more damage on their economies after the dislocation caused by months of lockdowns.
In the United States, the victory of Joseph R. Biden Jr. over President Trump in last month’s election changed the calculation for Mr. Johnson. Mr. Trump, an enthusiastic proponent of Brexit, had promised that the United States would negotiate a lucrative trade deal with Britain after it left the European embrace.
Mr. Biden, however, has said that he views Brexit as a mistake and has ruled out negotiating new trade agreements with any country until, he says, the United States improves its competitiveness at home. That has deprived Mr. Johnson of one of his primary selling points for concluding the Brexit process.
Mr. Biden is also a staunch defender of Ireland and the Good Friday Agreement, the peace accord that settled decades of sectarian violence in Northern Ireland. A failed Brexit trade negotiation could have threatened that peace, since it would have raised the specter of a return to a hard border across the island of Ireland.
During the American campaign, Mr. Biden put Mr. Johnson on notice that Britain should not undermine the accord. And since the election, British officials have been at pains to demonstrate their readiness to work with the Biden administration on issues like climate change and support for NATO.
The long road to the bare-bones agreement began in 2016, when the British prime minister at the time, David Cameron, scheduled a referendum on European Union membership as a way of settling decades of division within his Conservative Party over Britain’s integration with continental allies. Unexpectedly, voters backed leaving.
But Mr. Cameron, who wanted to remain in the bloc, prevented officials from drawing up plans for what Brexit would actually look like. That unenviable task fell to Theresa May, who took over as prime minister when Mr. Cameron quit after the shock of the vote.
For almost three years, Mrs. May labored in vain to craft and win Parliament’s support for an arrangement that would end the right of Europeans to settle and work in Britain and allow the country to leave the European Union’s economic embrace.
Her solution to the riddle of Northern Ireland was to promise to negotiate a trade deal but, in the meantime, remain relatively closely tied to the European trading system to prevent the creation of a hard border in Ireland.
While that would have helped businesses, which worried about the disruption of Brexit, it would have required continuing to obey many European rules — something that was anathema to hard-line Brexiteers. Opponents of Brexit were also unimpressed and pressed for a second referendum to overturn the result.
The upshot was months of angry stalemate and repeated futile votes in Parliament, which ended only with Mrs. May’s resignation. Mr. Johnson then won his thumping election victory.
Though Mr. Johnson opted for a much more distant relationship with the European Union — seeking only a basic trade deal — even that proved elusive during months of bluster, bickering and brinkmanship.
Often, the two sides talked past each other. For Mr. Johnson and his band of Brexiteers, reasserting sovereignty, escaping Europe’s economic rule book and revitalizing Britain’s economy were the cardinal objectives.
For the European Union, defending the integrity of its single market was paramount. Britain’s go-it-alone instincts meant that Brussels risked giving preferential access to its market to a competitor who applied less stringent standards to exports.
While much of the talks revolved around arcane issues of state aid and dispute resolution mechanisms, they were nearly sunk in the end by the politically fraught, if economically marginal, issue of fishing rights.
In Britain, just 12,000 people fish from 6,000 vessels and contribute less than half of one percent to the country’s economic output — less than that of the fashionable London department store Harrods. But in coastal towns and villages on both sides of the English Channel, fishing is of vital importance.
During the 2016 referendum campaign, Mr. Johnson promised fishing workers in Britain that Brexit would reclaim control over the country’s national waters, which have been shared with French and other European fishing crews for decades or, in some cases, centuries.
But fishing is also resonant in France, not least for President Emmanuel Macron, who faces an election in 2022. French fleets depend heavily on fish caught in British waters. Under current quotas, for example, 84 percent of the cod caught in one zone off the English coast is allocated to France, while just 9 percent goes to Britain.
The harried final days of Britain’s long divorce from the European Union were marked by haggling over something the two sides have shared for centuries: haddock and cod.