Budapest (AFP) - Hungary has accused Austria of confusing "solidarity and stupidity" after Vienna said that nations which do not accept their share of refugees under European Union quotas should face sanctions.

Austrian Chancellor Werner Faymann had said that countries who did not cooperate with the programme and received more money from the EU than they put in should see their subsidies cut.

"The Austrian chancellor does not see the difference between solidarity and stupidity" said Budapest's Foreign Minister Peter Szijjarto.

"Solidarity means helping people who are in danger where they live, and helping them to return home once the conflict is finished," Szijjarto told Hungarian national press agency MTI Sunday.

"Stupidity is letting hundreds of thousands of people -- millions -- into Europe with no controls, while everyone, Europeans and migrants alike, can see they'll never get what they hoped for here," he said.

German Foreign Minister Frank-Walter Steinmeier has also threatened legal action against EU countries that refused to accept refugees under the bloc's quota programme, specifically mentioning Hungary and Slovakia.

Szijjarto, a member of Viktor Orban's hardline right-wing government, accused foreign politicians of "using blackmail to bring more migrants into Europe, then distributing them through a system of obligatory quotas".

According to plans to distribute 160,000 refugees and migrants across the bloc, Slovakia and Hungary are due to take in around 2,300 people each. But the relocation plan, drawn up in September, is proving to be slow moving and difficult to put into effect.