The Polish parliament has backed a state of emergency on the Belarus border amid a surge in migration and upcoming Russian-led military exercises.
The tough law bans large gatherings and limits movement for 30 days in areas along Poland’s border with Belarus.
Poland accuses Belarus of inducing migrants to fly there on the false promise of legal entry to the EU.
Belarus is not an EU member but borders three countries which are.
Polish MPs voted to approve the law on Monday, though many opposition politicians said the emergency measures were disproportionate as close to 200 towns in a 3km (2 mile) strip along the border are now off limits.
By barring journalists from the area, they accused the government of trying to cover up a practice of pushing people seeking asylum back into Belarus.
Poland and fellow EU states Lithuania and Latvia have seen massive increases in migrants from Iraq, Afghanistan and other Middle Eastern and Asian countries since the start of the summer.
Last month alone, Polish border guards detained eight times as many people crossing the border illegally as they did in the whole of 2020.
The EU has accused Belarus’s authoritarian President Alexander Lukashenko of engineering the migrant influx as a form of retaliation against sanctions.
The Belarusian government has denied the allegations and blamed Western politicians for the situation on the border.
Speaking in parliament before Monday’s vote, Polish Prime Minister Mateusz Morawiecki said “we are dealing with a wide-ranging political provocation”.
On top of migration, he cited concerns about large joint Russian and Belarussian military exercises that are due to start near the Polish border from Friday.
The Zapad-2021 drills will be held at training grounds in Russia and Belarus and will be based on a scenario in which those countries come under attack.
Russia’s Tass news agency said the drills will involve about 200,000 people, and more than 80 planes and helicopters. Russia and Belarus have insisted that the drills are defensive in nature.
But Poland, the Baltic states and Ukraine are sceptical of their intentions.
Addressing MPs, Mr Morawiecki said an attack “might be probable”, warning that this was “not only a diplomatic conflict”
Human rights campaigners have expressed concern about migrants with no shelter stuck on the border between Poland and Belarus.
Protests against the treatment of migrants at the border were held outside parliament ahead of Monday’s vote.
Poland has laid barbed-wire coils and is building a solid fence along its border with Belarus, where hundreds of troops have been sent. Lithuania and Latvia have taken similar steps to reinforce their borders with Belarus.