Poland will end extended border controls with Slovakia at midnight on Saturday, the interior ministry said, after a decline in the threat of illegal migration across that part of the frontier.

Slovakia is a transit country for migrants - mostly from the Middle East and Afghanistan - seeking to reach western Europe, especially Germany, after crossing into the European Union via Hungary from Serbia, which is not in the EU.

Poland, the Czech Republic and Austria all tightened their borders with Slovakia on Oct. 4. The measures were later extended several times.

"This decision (to end controls) was motivated by the stabilisation of the migration situation in the so-called the Balkan route and the disappearance of the threat of illegal migration on the Polish-Slovak section of the state border," the Polish interior ministry said on Friday.

"As part of cross-border cooperation, the migration situation will be monitored on an ongoing basis and, if the threat increases, control activities at the border may be resumed."

Poland, Slovakia, the Czech Republic, Hungary and Austria are all part of Europe's open-border Schengen zone. (Reporting by Anna Wlodarczak-Semczuk; Editing by Timothy Heritage)