To sort out the Libyan civil war, the European Union first needs to sort out another vicious, internecine struggle: the one back home.

As the EU faces the first test of its “geopolitical” ambitions, it’s running up against obstacles on the home front. The bloc’s efforts to bring stability to the North African country are being hampered by internal divisions over how best to deal with migrants and refugees.

These include a battle over the future of the center-right European People’s Party (EPP) — until recently the dominant force in Brussels — as well as an unresolved tussle between national governments over how to redistribute asylum seekers.

“We cannot claim to be a ‘geopolitical power’ or a ‘geopolitical Commission’ if we cannot solve problems in our immediate neighborhood,” the EU’s foreign policy chief Josep Borrell said in a press conference in December.

Libya, one of the main gateways for migrants crossing into Europe, was until recently one of the places where divisions between EU countries were on full display, with Italy backing the internationally recognized government in Tripoli and France quietly supporting the rebel forces assaulting the capital.

“I am deeply frustrated with what’s happening in Libya” — Antonio Guterres, U.N. secretary-general

A German-backed initiative last month quelled the disagreement between Paris and Rome, but so far has achieved little more.

The Berlin conference “has had the merit of bringing peace between Rome and Paris, rather than having made a real difference on the management of the crisis,” said Arturo Varvelli, a Libya analyst and senior policy fellow for the European Council on Foreign Relations, a think tank.

The on-paper commitment by the various actors in the country — including Turkey, Qatar, Russia, Egypt, the United States and the United Arab Emirates — to respect a U.N. arms embargo and a cease-fire has yet to be translated into reality.

“I am deeply frustrated with what’s happening in Libya,” U.N. Secretary-General Antonio Guterres said last week. “The truth is that the Security Council [arms] embargo remains violated.”

Meanwhile in the EU, an effort to follow up on the Berlin conference by reviving Operation Sophia, the bloc’s naval mission in the central Mediterranean, has devolved into bickering about what exactly the mission should entail.

Since the mission was stripped of its naval assets last March, under pressure from then Italian Interior Minister Matteo Salvini, Operation Sophia has been unable to effectively carry out its mandate to enforce the U.N. arms embargo.

In the weeks since the Berlin conference, EU diplomats have been unable to agree to restore Operation Sophia’s naval capabilities, assenting only to beefed-up air and satellite surveillance.

This time the obstacle is not Rome but Vienna, where the ambitious young Austrian Chancellor Sebastian Kurz has been echoing some of Salvini’s arguments against the mission.

In a recent interview, Kurz said that naval assets in the Mediterranean have served as a so-called pull factor encouraging migrants to risk the perilous crossing in the belief that it will be safer. The presence of EU vessels would be “a ticket to Europe for thousands of illegal migrants,” Kurz said.

Given that changes to Operation Sophia require the unanimous consent of the EU’s national governments, the veto from Vienna has left the naval mission without any naval vessels.

“We’re embroiled in a battle for the future of the EPP,” complained an EU diplomat.

The struggle over migration also extends beyond the EPP, as national governments continue to disagree about what should be done with migrants who are rescued at sea.

Kurz — a hard-liner on migration — is considered to be a contender for the EPP’s de facto leadership. As the era of Angela Merkel comes to an end, the party is at odds over whether to continue the German chancellor’s relatively soft line on migration. The suspicion of many EU diplomats is that Operation Sophia got caught in this battle.

The struggle over migration also extends beyond the EPP, as national governments continue to disagree about what should be done with migrants who are rescued at sea.

Diplomats say they have been unable to agree on the issue. They point to the fact that the Commission is about to present a new proposal on how to redistribute asylum seekers, but note that every attempt to find a common approach since the 2015 migration crisis has failed.

EU foreign ministers are expected to pick up the question about Operation Sophia again at their next meeting on Monday, but few expect any breakthroughs regarding the Libyan civil war.

Those are unlikely as long as Europe’s battles over migration remain unsettled. And “anyway, only EU leaders can take these decisions,” said one of the senior diplomats.