Minister for Justice and Migration Morgan Johansson | Jessica Gow /AFP via Getty Images Sweden challenges Germany on refugees

Sweden threatened legal action Friday against Germany’s refugee policy, alleging that Berlin is not fulfilling its obligations under EU rules.

At issue is the German authorities’ refusal to take back refugees who were first registered at the German border, but later claimed asylum on Swedish soil.

“We have already contacted the government at the civil servant level and we are not alone,” Swedish Migration and Justice Minister Morgan Johansson told the TT news agency. “This involves most other EU countries. If they [the German government] stand by this, it could end up at the EU court of justice.”

Speaking later on Friday after EU justice and interior ministers met in Brussels, Johansson said Sweden would first involve the European Commission to try to solve the dispute.

Although most refugees arrive in Southern Europe — in most cases, Greece and Italy — they often hide from authorities and get only registered for the first time at the German border. In some cases, however, refugees registered in Germany continue to countries like Sweden to ask for asylum.

In February, the German Federal Office for Migration and Refugees (BAMF) decided to change its interpretation of the Dublin regulation, which requires that asylum seekers must be returned to the first EU country of arrival.

“What we are talking about here are only those cases in which we have, for security reasons, processed and saved [the refugee's data], but in which there had been no request for international protection in Germany,” a spokesperson of the German interior ministry said, adding that the Dublin rules do not oblige Germany to take back these cases.

German Chancellor Angela Merkel has already lost one key ally in the refugee crisis, since Austria decided to cap the number of refugees it takes.

Sweden’s Johansson told reporters: “There is still a very high influx into Germany, almost 100,000 in January alone ... one can understand the pressure Germany is under ... [but] that doesn't mean one can break the Dublin rules.”

German Justice Minister Heiko Maas appeared optimistic that the dispute can be resolved, saying: “I'm sure we will find a common line with the Swedish government on this.”

Nicholas Vinocur contributed to this article.