Despite signs of desperation in Greece's labor market, nearly 9,000 foreigners are able to remain in the country illegally after working with European officials to transfer residency permits to "wealthy applicants."

The State Agency for Migration and Home Affairs says some Greeks fleeing economic hardship are exploiting a loophole that allows foreign workers to acquire residence papers in Greece from one agency or company with whom they work. The agency reported that it handled some 8,700 applications for permits between September and January.

Greece says foreign workers are barred from obtaining permanent residence documents. The Government spokesman Dimitris Tzanakopoulos told The Associated Press that the agency had not received any request for foreign nationals to apply for residency in Greece in 2019.

The agency's website lists 71 foreigners from 19 countries who are permitted to retain resident status in Greece, a 30% increase on the same period last year.

Most Greeks support a crackdown on "fly-in" foreigners. Efforts to crack down on illegal work and residency have picked up steam since the Syriza government took power in 2015.

In an effort to avoid chaotic border closures and deportations that followed the dissolution of the country's labor-market reforms during the height of the financial crisis, the government has embarked on a number of reforms and opened its borders.

The pilot system in operation since June is designed to reduce the number of foreign workers in Greece. Piloted by two authorities — labor and the Interior Ministry — it grants seven-year residence permits to Chinese nationals who have worked in Greece for at least five years and who can show "a good measure of capital formation." Those who obtained status by December 2018 are eligible for one more five-year extension.

The Greek Financial Security Fund, which manages state-owned companies, is handing out 1,150 five-year residency permits, mostly to Macedonian doctors and engineers, and counting.

The applications were approved largely because of a system in which the applicant and the company together contribute 6,440 euros ($7,540) per worker to fund a social security system, largely paid for by the Greek government.

Until this summer, the Greek government has never said who is eligible for residence or other government-issued documents. Earlier this week, the Financial Security Fund said it would no longer provide residence permits for six Iranian doctors after news reports and criticism by the European Union said Iranian applicants were given the right to remain.

The Treasury said Greece would no longer accept applicants from Armenia, Belize, Belize, Haiti, Latvia, Nigeria, Qatar, Singapore, Togo, Uzbekistan and Venezuela.