Poland's parliament passed legislation on Thursday that human rights advocates say aims to legalise pushbacks of migrants across its borders in breach of the country's commitments under international law.
Poland, Lithuania and Latvia have reported sharp increases in migrants from countries such as Afghanistan and Iraq trying to cross their frontiers from Belarus, in what Warsaw and Brussels say is a form of hybrid warfare designed to put pressure on the EU over sanctions it imposed on Minsk.
Rights groups have criticised Poland's nationalist government over its treatment of migrants at the border, with accusations of multiple illegal pushbacks. Six people have been found dead near the border since the surge of migrants.
Border guards argue they are acting in accordance with government regulations amended in August and now written into law. The legislation must now be signed by President Andrzej Duda, an ally of the ruling nationalists, to take force.
The amendments include a procedure whereby a person caught illegally crossing the border can be ordered to leave Polish territory based on a decision by the local Border Guard chief.
The order may be appealed to the commander of the Border Guard, but this does not suspend its execution.
Additionally, the bill allows the chief of the Office of Foreigners to disregard an application for international protection by a foreigner immediately caught after illegally crossing the border.
Under international law, migrants have a right to claim asylum and it is forbidden to send potential asylum-seekers back to where their lives or well-being might be in danger.
The EU's home affairs commissioner has said EU countries need to protect the bloc's external borders, but that they also have to uphold the rule of law and fundamental rights.
Critics such as Poland's Human Rights Ombudsman and the Organisation for Security and Cooperation in Europe's (OSCE) Office for Democratic Institutions and Human Rights say the new law does not guarantee effective recourse for people - migrants or refugees - seeking international protection.
"If there are people who have a legitimate request to seek asylum, there should be a way to allow that to happen," ODIHR director Matteo Mecacci told Reuters.
"I understand there are also security concerns...but security concerns cannot completely overrun the need for international protection."
The lower house of the Polish parliament voted on Thursday in favour of a government plan to spend more than 1.6 billion zlotys (€350 million) on building a wall on Poland's border with Belarus in a bid to stem the flow of migrants trying to cross.
Lawmakers in the Sejm, where the ruling Law and Justice (PiS) party has a thin majority, voted to adopt the bill, which will now go to the opposition-dominated Senate. It was not immediately clear how the bill would fare in the Senate.
In August, Poland began building a barbed wire fence along its border with Belarus to curb the illegal border crossings despite criticism that some migrants were being treated inhumanely. The wall, which would come with motion sensors and cameras, would further bolster border security.