Powerful countries in the European Union are considering giving an ultimatum to Poland and Hungary: accept refugees, or be kicked out of the EU.

Germany, France and 21 other countries will make the demand, reported the British newspaper The Times on Tuesday. In 2015, the European Union laid out a two-year plan to resettle 160,000 migrants coming to Europe from the Middle East and Africa, but Hungary and Poland have refused to accept refugees allotted to arrive in their countries.

Read: Where Did Refugees Go? Here's A Map Of Where Migrants Have Settled

In fact, Hungarian President Viktor Orban went through great lengths to keep out asylum-seekers by building a fence across its southern border with Serbia in 2015. Hungary is currently in the process of building a second fence as reinforcement.

“Of course it’s not accepted, but the factual point is that all the terrorists are basically migrants,” Orban told Politico in 2015. “The question is when they migrated to the European Union.”

Read: Hungary's Second Fence To Stop Refugees Will Be Finished By This Summer

One Hungarian village near the country’s southern border banned Muslim traditions and Islamic dress. The mayor of the village has bragged about his “Muslim hunting,” in which Hungarians catch migrants attempting to cross the border.

So far, fewer than 15,000 of the 160,000 refugees have been resettled, according to Reuters, with many asylum seekers stuck in camps in Greece and Italy. The European Court of Justice will reportedly decide in the coming weeks whether the migrant quotas are legal.

A senior diplomatic source spoke to The Times about the ultimatum, who said, “You cannot blackmail the EU. Unity has a price.”

“We are confident that the (European Court of Justice) will confirm validation,” the source said. “Then they must abide by the decision. If they don’t then they will face consequences, both financial and political. No more opt-outs. There is no more ‘one foot in and one foot out’. We are going to be very tough on this.”

Although Hungary and Poland, two countries with conservative, eurosceptic governments, are leading the charge against migrant quotas, they are not alone. Last week, Austria asked the European Union to be exempt from taking in any more refugees.

Last June, the total number of refugees in the world reached 65 million — meaning roughly 1 percent of the global population have been displaced from their homes.

Refugees Migrants make their way after crossing the border at Zakany, Hungary, Oct. 16, 2015. Photo: Reuters