The European Parliament on Wednesday narrowly approved an expansive reform of the European Union’s often porous migration and asylum policy.

However, opposition was expressed by both the right and the left in the chamber, with the MEPs of the former side saying the reforms were timid in the face of growing illegal migration, and with MEPs aligned with the left charging that human rights of asylum seekers sneaking into the bloc could be violated.

In the end, however, the legislation passed.

“We have listened, we have acted and we have delivered on one of the main concerns of people across Europe, this is a historic day,” European Parliament president Roberta Metsola, herself a native of front-line state Malta, said.

She promised the new pact would be “fair” with those entitled to international protection, “firm” with those who are ineligible, and “strong” against smugglers. But, she added, it would not “magically solve every issue overnight.”

Member-states will now have to ratify the legislation, dubbed the New Pact on Migration and Asylum, for its formal implementation.

The basic provisions of the new pact include the management, including the identification of asylum seekers, along with accelerated border procedures and the resettlement of would-be asylum seekers, whose “mandatory solidarity” is a point bitterly opposed by non-border EU members, such as Hungary.

According to Euronews, the five primary laws contained in the newly approved pact:

The Screening Regulation envisions a pre-entry procedure to swiftly examine an asylum seeker’s profile and collect basic information such as nationality, age, fingerprints and facial image. Health and security checks will also be carried out.

The amended Eurodac Regulation updates Eurodac, a large-scale database that will store the biometric evidence collected during the screening process. The database will shift from counting applications to counting applicants and prevent the same person from filing multiple claims. The minimal age for collecting fingerprints will be lowered from 14 to 6 years.

The amended Asylum Procedures Regulation (APR) sets two possible steps for claimants: the traditional asylum procedure, which is lengthy, and a fast-tracked border procedure, meant to last a maximum of 12 weeks. The border procedure will apply to migrants who pose a risk to national security, provide misleading information or come from countries with low recognition rates, such as Morocco, Pakistan and India. These migrants will not be allowed to enter the country’s territory and instead be kept at facilities on the border, creating a “legal fiction of non-entry.”

The Asylum and Migration Management Regulation (AMMR) establishes a system of “mandatory solidarity” that will offer member states three options to manage migration flows: relocate a certain number of asylum seekers, pay €20,000 for each claimant they refuse to relocate, or finance operational support. Brussels aims at 30,000 relocations per year but insists the system will not force any country to accept refugees as long as they contribute through any of the other two options.

The Crisis Regulation foresees exceptional rules that will be triggered when the bloc’s asylum system is threatened by a sudden and massive arrival of refugees, as was the case during the 2015-2016 crisis, or by a situation of force majeure, like the COVID-19 pandemic. In these circumstances, national authorities will be allowed to apply tougher measures, including longer periods of registration and detention, and the Commission will be empowered to request additional “solidarity” measures.”