LONDON — Damian Wawrzyniak, who has cooked for the British royal family and was a top chef at the London Olympics, said he felt gutted when he was turned down for permanent residency in Britain, despite living here for more than 15 years, paying his taxes and "speaking good English."

“It wasn’t a really nice feeling,” said the 39-year-old chef, whose understatement may be a byproduct of his long residency in England. “I’d spent more time in my adult life in the U.K. than in Poland, and I suddenly felt like a second-class citizen.”

He is one of millions of Europeans who have easily lived and worked between and among the 28 member states of the European Union, embracing one of the bloc’s pillars: freedom of movement.

But as Britain prepares to leave the E.U. this week and enter an 11-month transition period, free movement here is nearing an end.

For a generation, for more than four decades, Londoners have been able to pack off to Lisbon, Berliners to Birmingham, Mancunians to Milan. No paperwork, no visas, no job offer needed on the other side — just buy a ticket and go.

Freedom of labor — beside the free movement of goods, capital and services — was one the biggest, boldest ideas of the 1957 Treaty of Rome. It was an audacious gambit that the people who had torn themselves to pieces in two world wars, who spoke dozens of languages, should be able to settle across a borderless continent.

Imagine free movement between Canada, the United States and Mexico, and you have something close.

But Brexit campaigners pushed the notion that Britain needed to “take back control” of its borders. Europeans, the Brexiteers claimed — looking pointedly at the poorer countries on the eastern edge of the bloc — took British jobs and strained British social services.

E.U. citizens will be able to continue to move here freely through the Brexit transition period, until at least December. But afterward, they will need to apply — and will no longer get preference over applicants from other continents.

British Prime Minister Boris Johnson has talked up a “points-based” system, similar to Australia’s, that would draw the “best and brightest.” The number of low-skilled immigrants will be slashed.

In the meantime, E.U. citizens — some of whom have called Britain home for decades — must apply if they want to stay. If they don’t register by June 2021, they will in effect be in the country illegally.

Wawrzyniak, the Polish chef, thinks this is deeply unfair. He has launched a petition calling for automatic settled status for all E.U. citizens and their family members already living in Britain. Advocates estimate there are about 3.6 million E.U. citizens in the United Kingdom, but add in non-E.U. dependents and that figure could be closer to 5 million.

Wawrzyniak, personally, will be okay. After a tweet of his went viral, officials made contact, admitted they made a mistake, and switched him from “pre-settled status” to “settled status.” But he’s worried for others who don’t have the same social media megaphone he does.

Johnson’s government dismisses concerns. The Home Office immigration service, often viewed as a black hole of bureaucracy, has created a user-friendly mobile app to enable E.U. citizens to apply for settled status online — and it has moved to give most applicants a quick answer.

So far, about 2.8 million people have applied. Of the 2.5 million who have received a decision, 58 percent were given “settled status,” and 41 percent were given “pre-settled status,” meaning they will have to reapply in five years. In all, only six have been outright refused on “suitability grounds,” mostly because of criminal records.

Another 300,000 are awaiting a decision.

Brandon Lewis, a Home Office minister, wrote in the Times of London that the government was “providing certainty to millions across the country so they can evidence their rights in decades to come.”

Luke Piper, an immigration lawyer who advises advocates for E.U. citizen rights, agreed the project was “seismic — it is very impressive, what they have managed to achieve so far.” But he cautioned that even if just 5 percent of the E.U. citizens fall through the cracks, that would amount to more than 100,000 people.

One looming question is what happens to those who miss the deadline.

Lewis told a German newspaper last fall that those who didn’t apply for residency would be at risk of being sent back home. He has since softened his stance, telling the BBC that police officers knocking on doors and deporting E.U. citizens is “not what we’re about.” The government says that if someone has “reasonable grounds” for missing the deadline, they’ll be given another chance to apply.

But even if Britain’s Home Office doesn’t actively deport people, it’s been known to promote an intentionally “hostile environment.” A policy introduced in 2012 effectively made doctors, teachers, employers and even landlords into immigration enforcement officers, obliging them to check people’s status.

A byproduct was the “Windrush scandal.” Windrush families came to Britain legally from Commonwealth countries in the Caribbean. They were subjects of the crown, invited by the British government to help rebuild after World War II. But when Britain tightened its immigration rules and increased documentation requirements, some were denied health care and lost their jobs and homes because they were unable to prove their status. A handful were even deported.

Robert Ford, a political science professor at the University of Manchester, said the situation for E.U. citizens in Britain who don’t register by the cutoff date could amount to “Windrush plus, plus, plus, plus.”

Advocates are especially concerned for the very old, the young, the infirm, people with complicated lives and people whose documents are misplaced. Might landlords refuse to rent to them? Might they be denied coverage by the National Health Service?

“If you are an E.U. citizen with breast cancer and have to suddenly pay 40,000 pounds for treatment, the fact that you’re also not going to be chucked out of the country is not really a response to the problem,” Ford said.

This is months down the road. But even now, E.U. citizens are anxious.

Elena Remigi, 51, has been collecting testimonials. Remigi moved from Italy to Ireland to Britain and said that, for many like her, there is a “sense of betrayal — that the rules we based our lives on are taken away.”

The same sentiment is felt among some of the 1.4 million Britons living in Europe.

People such as Carole-Anne Richards, 53, who has lived in Italy for 15 years and travels extensively through Europe for her work as a consultant.

Speaking on a drizzly day at a rally in London, Richards noted that, after Brexit, she won’t be an E.U. citizen living in Italy, but rather a “third-country national,” with implications for her work and personal life. “I will have difficulties doing my job because I no longer have freedom of movement,” she said.

Anna Amato, 57, was just 18 months old when she moved from Italy to Bristol, England, her home ever since. She has a British husband, two British children and has worked in several jobs, including as a medical secretary at a hospital.

In 2017, after the Brexit referendum, she decided to get British citizenship, which she thought would be a formality. She was told by officials to instead apply first for permanent residency, which she was denied on the grounds that she didn’t provide enough evidence to prove her status.

Although Home Office officials said they have been in touch with Amato, she has not tried to apply again under the settled-status system introduced last year. “What if I am denied again? I don’t trust the system and I’m not going to apply for less rights than I have now,” she said.

She said she felt “humiliated” by the whole ordeal. “I am now questioning: Who am I? I always felt like I belonged. I have always felt British; I am proud to be British. But now, they’re telling me, ‘We don’t want you,’ ” she said. “When people say to me, ‘Go back,’ where do I ‘go back’ to?”