Austria's interior minister threatened on Wednesday to sue Hungary if it refused to take back migrants who had crossed their shared border, Reuters reports.
Austria's government has repeatedly accused Hungary of letting migrants enter its territory in the face of EU rules that asylum seekers must stay in the first country they enter in the bloc.
Hungary, preparing for a referendum on whether to accept a Europe-wide asylum quota, has insisted that most refugees enter its territory from other EU states, notably Italy and Greece.
Read also: Migrants influx won't fundamentally change Germany - Chancellor Merkel
"States or groups of states that permanently break the law have to expect legal consequences," Interior Minister Wolfgang Sobotka told ORF radio, responding to a question on Hungary's refusal to give ground.
"In that case, the (Austrian) republic must sue. The republic must see that the European Union acts according to the law, full stop," he added, without specifying what legal process he was considering.
Budapest built a fence along its border with non-EU member Serbia to stem the flow of hundreds of thousands of people, many of them fleeing violence in the Middle East and North Africa. Both Hungary and Austria had said this month the situation was now broadly under control.
Read also: Hungary to build new, "more massive" fence against migrants - PM Orban
A Hungarian government spokesman dismissed Sobotka's call in an emailed statement, saying the vast majority of migrants had arrived in other EU states first.
Germany and Austria initially welcomed large numbers of refugees from the Middle East and Afghanistan. However, Vienna started to toughen its asylum rules earlier this year and introduced an annual limit on the number of asylum requests it accepts.