LONDON (AP) — Britons counted down the hours Friday to their country’s departure from the European Union — some joyous, some sad, many just hopeful the divorce would mark the end an anguished chapter in their country’s history.

The U.K. officially departs the EU at 11 p.m. local time, midnight in Brussels (2300 GMT, 6 p.m. EST). The departure comes 3½ years after the country voted by a margin of 52%-48% to walk away from the club that it had joined in 1973.

Throughout the day, small bands of ardent Brexit backers gathered outside Parliament in London to celebrate. Nearby, pro-Europeans waving the bloc’s blue and yellow flag came to commiserate.

Whether Brexit makes Britain a proud nation that has reclaimed its sovereignty, or a diminished presence in Europe and the world, will be debated for years to come.

The now 27-member EU will have to bounce back from one of its biggest setbacks in its 62-year history to confront an ever more complicated world as its former member becomes a competitor, just across the English Channel.

The EU flag and Union Jack were lowered Friday outside Britain’s EU office in Brussels. Starting Saturday, it will become an embassy, with just the British flag flying.

It’s the first time a country has left the EU, and many in the bloc rued the day. In Brussels, EU Commission President Ursula von der Leyen lamented that “as the sun rises tomorrow a new chapter for our union of 27 will start."

But she warned Brexit day would mark a major loss for the U.K. and said the island nation is heading for a lonelier existence. “Strength does not lie in splendid isolation, but in our unique union." Newspapers across the continent were marking the departure with headlines of “Adieu to Europe" and “Bye-Bye!” next to a Union Jack flag.

U.K. Prime Minister Boris Johnson was holding a Cabinet meeting in the pro-Brexit town of Sunderland, in northeast England. He is scheduled to deliver a pre-recorded address to the country an hour before departure, calling Brexit “not an end but a beginning.”

According to his office, he will describe it as "a moment of real national renewal and change.”

In a break with usual practice, independent media outlets were not allowed to film Johnson’s speech, which was recorded by the government at 10 Downing St.

The government is marking Brexit in what it intends to be a dignified, nontriumphalist fashion, with red, white and blue lights illuminating government buildings and a countdown clock projected onto the prime minister’s Downing Street residence.

Inside, Johnson will gather with Cabinet ministers, aides, civil servants and Brexit campaigners for a reception featuring English sparkling wine and canapes including shortbread with English blue cheese and roast beef with Yorkshire pudding.

Some Brexit supporters will be holding more raucous celebrations. Arch-Brexiteer Nigel Farage and his band of devotees will gather for patriotic songs and speeches in London's Parliament Square to mark a moment that even Farage sometimes doubted would ever come.

Others do not feel like indulging in any festivities.

“It's a very sad day," said lawyer Alice Cole-Roberts. “I'm very upset that we are leaving the European Union and I simply wish it didn't happen."

Britain’s departure is a historic moment, but it only marks the end of the first stage of the Brexit saga. When Britons wake up on Saturday, they will notice very little change. The U.K. and the EU have given themselves an 11-month “transition period” — in which the U.K. will continue to follow the bloc’s rules — to strike new agreements on trade, security and a host of other areas.

Negotiations are due to start in March, and the early signs are not encouraging.

Von der Leyen said the EU would be “united in defending its interests.”

“For all third countries, the rule is that only by recognizing the EU single market rules can you reap the rewards," she said.

But Britain insists it will not agree to follow an EU rule book in return for unfettered trade.

“We want trade to be as frictionless as possible, but the EU is clear, you can only have fully frictionless trade if you accept all of their rules, if you accept all their laws,” said Cabinet minister Michael Gove. “We voted to be independent.”

Johnson’s government hopes to negotiate a deal with the EU alongside a free trade agreement with the United States. That’s also likely to be contentious.

Opposition politicians are already raising concerns about issues ranging from food-safety standards — especially the U.S. practice of chlorine-washing chicken to kill germs — to drug prices.

Britain was never a wholehearted EU member, but actually leaving the bloc was long considered a fringe idea. It gradually gained strength within the Conservative Party, which has a wing of fierce “euroskeptics” — opponents of EU membership. Former Prime Minister David Cameron eventually agreed to hold a referendum, saying he wanted to settle the issue once and for all.

It hasn’t worked out that way. Since the 2016 vote, the U.K. has held fractious negotiations with the EU that finally, late last year, secured a deal on divorce terms. But Britain is leaving the bloc arguably as divided as it was on referendum day.

By and large, Britain's big cities voted to stay in the EU, while small towns voted to leave. England and Wales backed Brexit, while Northern Ireland and Scotland voted to remain.

In Edinburgh, the EU flag will not be lowered outside the Scottish Parliament on Friday night. Lawmakers there voted to keep it as a symbol of their opposition to Brexit. Scotland’s pro-EU government will also light up two government buildings in the blue and yellow of the EU flag on Friday.

First Minister Nicola Sturgeon said Brexit “will be a moment of profound sadness for many of us across the U.K.”

“And here in Scotland, given that it is happening against the will of the vast majority of us, that sadness will be tinged with anger,” she said in a speech in Edinburgh.

Sturgeon’s Scottish National Party government is demanding the right to hold a referendum on independence from the U.K., something Johnson refuses to grant.

London, which is home to more than 1 million EU citizens, also voted by a wide margin to stay in the bloc.

Mayor Sadiq Khan said he was “heartbroken” about Brexit.

Khan, who has linked the Brexit vote to a rise in xenophobic abuse, said Britain’s capital would remain an “open-minded, out-looking, pluralistic” city.

“We should be really proud that we as a city voted overwhelmingly to remain,” Khan told the AP. “We should be really proud that we are a city that welcomes people who are different. The color of your skin, the color of your flag, the color of your passport has no different implications. We welcome you to our city.”

In the English port of Dover, just 20 miles (32 kilometers) across the Channel from France, retiree Philip Barry welcomed the new era.

“My expectation is that there may be a little bump or two in the road but in the end it will even out,” he said. "Somebody once said: short-term pain but long-term gain.”

___

Associated Press video journalists Jo Kearney and Philipp-Moritz Jenne contributed. Casert reported from Brussels

___

Follow AP’s full coverage of Brexit and British politics at: https://www.apnews.com/Brexit