Prime Minister Luis Montenegro has vowed to put an end to the “wide-open doors” policy with new limitations on one of Europe’s most open immigration regimes.

Portugal repealed a key migration policy on Monday as it aims to limit the number of new arrivals.

The changes put an end to a rule that allowed non-EU migrants to move to Portugal without an employment contract and later request residency after paying social security for a year.

Now, migrants will need an employment contract before moving to the country.

Portugal has one of Europe’s most open immigration regimes, but the country has witnessed a political shift toward the right wing, with border restrictions being a key issue.

Newly elected Prime Minister Luis Montenegro said he wanted to “put an end to… excessive abuse” of its welcome for migrants.

How many migrants are in Portugal?

Portugal’s foreign population has doubled in five years, with many people coming from Asia to work on farms and in restaurants.

Overseas arrivals now make up one million people — roughly a tenth of the total population — according to government data.

Last year, 180,000 migrants were regularized.

Montenegro said there are currently around 400,000 regularization applications still pending.

“We need people in Portugal willing to help us build a fairer and more prosperous society,” he said. “But we cannot go to the other extreme and have wide-open doors.”