Poland's parliament has passed new legislation that critics say legalises turning away migrants at its borders, in breach of human rights law.
The amendments include a procedure that means a person caught crossing the border can be ordered to leave Polish territory based on a decision by the local border guard chief.
Although this may be appealed to the commander of the border guard, this does not stop border officials from carrying out the order in the first place.
It also allows the chief of the Office of Foreigners to disregard an application for international protection by someone immediately caught after crossing into the country.
Under international law, migrants have a right to claim asylum and it is illegal to send them back to a country where their lives may be in danger.
Human rights groups have criticised Poland's nationalist government over its treatment of migrants at the border.
On Thursday, authorities said so far this month there had been 6,700 hindered attempts to illegally enter Poland and more than 10,000 since August.
A further 1,500 people have been detained inside Poland and taken to guarded facilities.
Six people have been found dead near the border since the surge in migration.
Although migrants arriving in Poland can apply for international protection there, or for asylum which would cover all of EU territory, most of these cases are denied and people are sent back to where they entered the country from.
The EU's home affairs commissioner 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 - including Poland's Human Rights Ombudsman and the Organisation for Security and Co-operation in Europe's (OSCE) Office for Democratic Institutions and Human Rights - said 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 said.
"I understand there are also security concerns...but security concerns cannot completely overrun the need for international protection."