The United Kingdom officially left the European Union on Friday after 47 years of membership, BBC reported. The exit took place at 11 pm Greenwich Mean Time, or 4.30 am Indian Standard Time. It was marked by both celebrations and anti-Brexit protests.

Candlelight vigils were held in Scotland, which had voted for the UK to stay in the European Union in the referendum in June 2016. On the other hand, a pro-Brexit crowd celebrated on London’s Parliament Square.

Prime Minister Boris Johnson promised a “new era of friendly cooperation” with the European Union, AFP reported. In a public address broadcast one hour before Brexit, Johnson acknowledged there may be “bumps in the road” ahead. However, he claimed that the departure was an opportunity for “stunning success”.

“The most important thing to say tonight is that this is not an end but a beginning,” Johnson said in a pre-recorded statement. “For many people this is an astonishing moment of hope, a moment they thought would never come. And there are many of course who feel a sense of anxiety and loss. And then there’s a third group, perhaps the biggest, who had started to worry that the whole political wrangle would never come to an end.”

The prime minister said he understood these feelings and his job was to “bring the country together”. He said that while the European Union had many admirable qualities, over the period which Britain was part of it, the bloc evolved in a direction that does not suit the United Kingdom.

“We want this to be the beginning of a new era of friendly cooperation between the EU and an energetic Britain,” Johnson said. “A Britain that is simultaneously a great European power, and truly global in our range and ambitions.”

The prime minister said the United Kingdom will use its “recaptured sovereignty” to control immigration, liberate the fishing industry and promote free trade. He promised to invest in public services, infrastructure and new technology across the country.

Meanwhile, European officials lowered the British flag from outside the European Parliament buildings in Brussels and Strasbourg, and removed it from the European Council. The blue and gold flag of the European Union was raised in its place. The European Union now has 27 member countries.

In December, after his Conservative Party swept the elections, Johnson had promised to take the country out of the European Union by January 31. “We will get Brexit done on time by the 31st of January, no ifs, no buts, no maybes,” Johnson told his supporters,” Johnson told his supporters at the time.

On January 24, Johnson signed the United Kingdom’s “divorce deal” with the European Union. European Union leaders Ursula von der Leyen and Charles Michel put their names to the treaty at a ceremony held behind closed doors in London’s Downing Street in the middle of the night.