Poland's government came under pressure on Friday over a visa fraud scandal ahead of elections in which the governing party is running on an anti-immigration platform.

"The actions of the central anti-corruption bureau have led to the detention of seven people," secret service spokesman Stanislaw Zaryn said on X, formerly known as Twitter.

Three of the seven are under arrest, according to the prosecutor's office, which is leading an inquiry into an alleged fraudulent scheme for obtaining visas.

Polish media have reported that the foreign ministry was involved in the scheme, which the opposition Civic Platform party has branded "the biggest scandal in Poland in the 21st century".

No public official is among the detained.

Media reports said a system for giving out Schengen visas to people from the Middle East and Africa in exchange for money was put in place through the Polish consulates and some external companies in the countries concerned.

The authorities say the scheme may have involved several hundred Polish work visas, while the opposition says the real number could be around 250,000.

Deputy Foreign Minister Piotr Wawrzyk resigned over the scandal last week, though the official reason for his departure was "absence of sufficient cooperation".

The governing Law and Justice (PiS) party has for years used anti-immigrant rhetoric, which was credited as one of the main reasons behind their victory in 2015 parliamentary elections.

Nongovernmental organisations have accused the government of engaging in forceful pushbacks of migrants seeking to cross the border from Belarus illegally and refusing legitimate asylum claims.

Poland last year completed construction of a steel barrier along the border to dissuade would-be migrants and has deployed thousands of soldiers there.

Warsaw accused Minsk and Moscow of engineering the flow of migrants as a "hybrid" attack intended to destabilise the region -- a charge Minsk denies.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.