MOSCOW (Reuters) -Russian President Vladimir Putin said on Saturday that Western countries, rather than Belarus, were ultimately responsible for a migrant crisis on the Belarus-Poland border, pointing to wars in Iraq and Afghanistan.

Russia is a key ally of Belarus, which the European Union has accused of mounting a “hybrid attack” by flying in thousands of migrants, mainly from the Middle East, and pushing them to try to cross illegally into Poland.

As the EU prepares to impose new sanctions on Minsk, Putin told Russian state television he thought Belarus was not to blame for the crisis.

“Let’s not forget where these crises with migrants came from … Is Belarus a pioneer in these problems? No, the reasons were created by Western and European countries themselves,” Putin said.

Referring to conflicts in Iraq and Afghanistan, Putin noted that Iraqi Kurds and Afghans were among the migrants at the Belarusian border.

“Belarus has nothing to do with it … the fact they’ve come via Belarus is unsurprising because Belarus … has visa-free entry for the countries of origin,” he said.

He accused Polish forces on the border with Belarus of beating migrants, firing rounds above their heads and turning on lights and sirens at night nearby.

“This doesn’t really tie in well with the ideas of humanity that supposedly underpin all the policies of our Western neighbours,” he said.

Putin said he hoped Belarusian President Alexander Lukashenko and German Chancellor Angela Merkel would discuss the crisis, saying the migrants mainly wanted to go to Germany and that Moscow had nothing to do with the standoff.

As the crisis has unfolded, the West has raised fears over Russian troop movements near the Ukrainian border and a possible attack, while Moscow has complained about increasing NATO activity in the region.

Putin said unscheduled NATO drills in the Black Sea posed a “serious challenge” for Moscow, saying the exercises involved a powerful naval group and armed strategic aircraft.

Russia’s Defence Ministry said it had detected and tracked four NATO spy planes flying in the Black Sea region in the last 24 hours, including a U.S. U-2S high-altitude reconnaissance aircraft in Ukrainian airspace, the RIA news agency reported.

(Reporting by Tom BalmforthEditing by Katya Golubkova and Helen Popper)