The tightened controls will begin on Wednesday and last for 10 days, with the possibility to extend the checks beyond that.

"This is a measure necessary for the effective fight against groups of smugglers and illegal migration," Czech Interior Minister Vit Rakusan said on social media platform X.

"Checks will take place at random along the entire length of the border with Slovakia, in such a way to, as little as possible, limit cross-border traffic and not unnecessarily burden traffic or passengers."

Slovakia has faced a rising number of illegal migrants coming into the country as they head to Germany and western Europe. The migrants, predominantly young men from the Middle East and Afghanistan, have mostly come up via the so-called Balkan route, entering Hungary from Serbia.

Slovakia's leftist former prime minister Robert Fico took a hard line on the issue heading into an election last weekend, which his party won. He is now seeking to form a government and has said guarding the border with Hungary will be a top priority.

Slovakia's Interior Ministry did not immediately reply to request for comment.

Polish Interior Minister Mariusz Kaminski said he had informed counterparts in Germany, Slovakia, Austria and the Czech Republic, as well as the European Commission, about the new controls, in accordance with rules for the European Union's Schengen zone for visa-free travel.

"In recent weeks, we detected and detained 551 illegal migrants at the border with Slovakia. This situation causes us to take decisive action," Kaminski said.

(Reporting by Jason Hovet in Prague and Pawel Florkiewicz in Warsaw; Editing by Andrew Heavens and Ed Osmond)