SOFIA, Bulgaria (AP) — Bulgarian prosecutors launched a probe Monday into the government's handling of refugee applications, trying to weed out possible illegal immigrants.

Bulgaria, a nation of 7.3 million that is the European Union's poorest member, has been caught unprepared for a surge in refugees, which is straining its asylum system and igniting xenophobia and intolerance. Some 9,500 refugees, most of them from war-torn Syria, have entered Bulgaria this year, according to official data.

Interior Minister Tsvetlin Yovchev said that number is well above Bulgaria's annual capacity of 5,000 refugees. He said a top priority for his office will be to cut the number of illegal immigrants.

Defense Minister Angel Naydenov said Monday that 40 percent of the immigrants come from countries that are not at war, but many have no documents and is was difficult to determine their status.

The government attributes the influx of illegal immigrants mainly to Algeria, Afghanistan and Iran and says there has been an increase in the number of those from Mali and Rwanda.

The Bulgarian army, meanwhile, have begun building a 30-kilometer (19-mile) long wire fence on its border with Turkey to keep out immigrants.

Opinion polls suggest that Bulgaria's refugee crisis is fueling nationalist actions. The Nationalist Party of Bulgaria, which was established last weekend, has declared one of its priorities to "clean" the country of immigrants. The move comes after several attacks against foreigners in the country.