Hungary has refused a request by the Swedish government to take in 5,000 asylum seekers, and the Swedes want to take the matter to court.

The Hungarian government has long held a position against the redistribution of migrants from other European countries going as far as holding a referendum on the subject last October. But Sweden is insisting that under European Union (EU) Dublin agreement rules, the migrants should be returned to the Central European country where they first registered, Svenska Dagbladet reports.

Swedish Immigration and Justice Minister Morgan Johansson met with EU migration and asylum Commissioner Dimitris Avramopoulos in Brussels Monday to discuss the issue. After the meeting, Mr. Johansson said: “It is the Commission’s responsibility to ensure that contracts are kept, and this is our opinion that Hungary did not follow the Dublin rules.”

“We have almost 5,000 cases where people are registered as asylum seekers in Hungary, but Hungary does not receive them when we send them back,” he added, claiming the EU Commission had a “duty” to open a case against Hungary for infringement of the Dublin agreement.

The case is not the first time a country has tried to send back migrants who registered in Hungary. In September last year, the Austrian government attempted to return migrants but were refused at the Hungarian border.

Austrian Interior Minister Wolfgang Sobotka commented at the time saying: “The European Union is in charge of … Dublin and states or groups of states that permanently break the law have to expect legal consequences.”

According to the Dublin agreement, asylum seekers are supposed to stay in the country where they first applied for asylum. During the height of the migrant crisis in 2015, the majority of migrants who had registered in Greece or Hungary left both countries to travel to Germany and Sweden which provide robust welfare programmes and have more successful economies.

Greece has also found itself in a similar position to Hungary with Germany announcing several months ago that it would seek to send migrants back to Greece starting in March. The Greek government has already complained that they cannot handle the migrants already in the country and are seeking help from the bloc.

The recent diplomatic row with Turkey could exacerbate issues in Greece following Turkish President Recep Tayyip Erdoğan asserting the migrant deal between his country and the EU was over, and the political bloc could “forget about” it.

Follow Chris Tomlinson on Twitter at @TomlinsonCJ or email at ctomlinson@breitbart.com