PRAGUE (Reuters) - The Czech Republic will halt taking in migrants under an EU scheme to share asylum seekers who arrived in Greece and Italy, citing security concerns, the government agreed on Monday.

Under a plan agreed in 2015, the European Commission wants EU member states to each admit a quota from a total of 160,000 asylum seekers stuck in the two Mediterranean countries. Most have fled conflicts and poverty in the Middle East and Africa.

But several EU members including the Czech Republic have protested the decision and some have refused to take in any people under the scheme.

By last month, the Czech Republic has only taken in a dozen out of the 2,691 migrants set by its quota, according to news agency CTK.

It will take no more before the plan expires in September, Interior Minister Milan Chovanec said.

“Due to the aggravated security situation and the dysfunctionality of the whole system, the government approved... a proposal to halt this system for the Czech Republic,” Chovanec told a news conference following a cabinet meeting.

“That means the Czech Republic will not be asking for migrants to be relocated from Greece and Italy.”

Poland, Hungary and Slovakia have refused to admit any asylum seekers under the scheme. Slovakia and Hungary have challenged the quotas in an EU court.

The European Commission has said it would decide in June on any legal cases against countries failing to take in their share of refugees and other migrants.

Chovanec said his ministry would coordinate the defense of any EU action against the Czech Republic related to the decision.

The Czech Republic will hold an election in October. Immigration is a sensitive topic, with most Czechs opposed to taking in people from Muslim countries.

The EU took in some 1.6 million people in 2014-2016. Greece has seen numbers drop after the bloc sealed a deal with Turkey to cut off arrivals transiting through that country, but Italy is facing increased arrivals from Libya.

The relocation scheme has fallen far short of what was planned with fewer than 18,500 people relocated so far.