Sweden will take Hungary to the European Court of Justice unless it starts taking back asylum seekers from other EU countries, the Swedish minister of justice and migration has said.

Morgan Johansson wrote to the EU migration commissioner, Dimitris Avramopoulos, calling on him to impose the Dublin Rules on Hungary.

Sweden has joined Denmark, Finland, Iceland and Norway in condemning Hungary for breaking EU Dublin rules. The accord stipulates refugees should seek asylum in the first Schengen zone country they arrive in.

“The commission is the guardian of the EU treaties. It has to ensure that governments stick to agreements they once signed up to,” Mr Johansson said in a letter.

The minister threatened to challenge Hungary in the European Court of Justice over the violation.

He told Swedish radio the EU migration commissioner replied to his letter and agreed Hungary must comply.

According to the Swedish Migration Agency, there are some 1,000 asylum seekers who registered in Hungary waiting to be transferred back there. In March, the agency announced it was suspending all transfers to Hungary after it received complaints about their asylum system.

Yet Hungary claims the refugees first entered the EU through Greece, so it is responsible for examining their claims instead.

According to the Dublin agreement, an EU country has six months to transfer a person to the country they were first registered in.

But if the transfer is not made within that timeframe, it becomes responsible itself for the asylum seeker instead.

Government’s spokesman Zoltan Kovacs said Hungary would refuse to accept returns of asylum seekers from other EU states.

"We are not going to take responsibility for the shortcomings of other countries," he said.

Austria has also threatened to take legal action against Hungary over failing to meet its Dublin agreement committment.

How Hungary welcomes its refugees - in pictures Show all 15 1 /15 How Hungary welcomes its refugees - in pictures How Hungary welcomes its refugees - in pictures Serbia-Hungary border Refugees protest as Hungarian riot police fires tear gas and water cannon on the Serbian side of the border, near Roszke How Hungary welcomes its refugees - in pictures Serbia-Hungary border A refugee throws a bottle of water towards Hungarian riot police after they used water cannon to push back refugees at the Hungarian border with Serbia near the town of Horgos How Hungary welcomes its refugees - in pictures Serbia-Hungary border Refugees protest as Hungarian riot police fires tear gas and water cannon at the border crossing with Serbia in Roszke How Hungary welcomes its refugees - in pictures Serbia-Hungary border Hungarian armoured personnel carriers are deployed at the border crossing with Serbia in Roszke How Hungary welcomes its refugees - in pictures Serbia-Hungary border Hungarian riot policemen are deployed at the border crossing with Serbia in Roszke How Hungary welcomes its refugees - in pictures Serbia-Hungary border Hungarian police spray water cannon on migrants at the "Horgos 2" border crossing into Hungary, Serbia How Hungary welcomes its refugees - in pictures Serbia-Hungary border A refugee reacts after Hungarian riot police use water cannon to push back refugees at the Hungarian border with Serbia near the town of Horgos How Hungary welcomes its refugees - in pictures Serbia-Hungary border A refugee gestures as Hungarian riot police use water cannon to push back refugees at the Hungarian border with Serbia near the town of Horgos How Hungary welcomes its refugees - in pictures Serbia-Hungary border A refugee throws a stone towards Hungarian riot police after they used water cannon and pepper spray to push back refugees at the Hungarian border with Serbia near the town of Horgos How Hungary welcomes its refugees - in pictures Serbia-Hungary border Refugees protest as Hungarian riot police fires tear gas and water cannon on the Serbian side of the border, near Roszke How Hungary welcomes its refugees - in pictures Serbia-Hungary border Migrants shout slogans as they stand in front of a barrier at the border with Hungary near the village of Horgos, Serbia How Hungary welcomes its refugees - in pictures Serbia-Hungary border Hungarian riot policemen run as they are deployed at the border crossing with Serbia in Roszke Reuters How Hungary welcomes its refugees - in pictures Serbia-Hungary border Hungarian riot policemen are deployed at the border crossing with Serbia in Roszke Reuters How Hungary welcomes its refugees - in pictures Serbia-Hungary border Refugees stand in front of a barrier at the border with Hungary near the village of Horgos, Serbia Reuters How Hungary welcomes its refugees - in pictures Serbia-Hungary border Refugees wait at the Horgos 2 border crossing EPA

Hungary has mounted its own legal challenge in the European Court of Justice over the Brussels plan to relocate 160,000 refugees from Italy and Greece using mandatory quotas.

In early October, the anti-immigrant government held a referendum on the quota system. More than 98 per cent of voters backed the government in its rejection of the mandatory quota system, but the turnout for the election was 43.9 per cent.

While the government claimed the result “sweeping victory”, analysts said the result was an “embarrassing but not totally catastrophic defeat” for Prime Minister Viktor Orban.