BRUSSELS (Reuters) - NATO allies have overcome territorial sensitivities between Greece and Turkey and agreed on how their ships will help counter the criminal networks smuggling refugees into Europe across the Aegean Sea, NATO’s chief said on Thursday.

A red sun is seen over a dinghy overcrowded with Syrian refugees drifting in the Aegean sea between Turkey and Greece after its motor broke down off the Greek island of Kos, August 11, 2015. REUTERS/Yannis Behrakis

After late-night talks in Brussels, NATO envoys set out how ships already sent to the Aegean, including Turkish and Greek vessels, will pass reconnaissance to Turkish and Greek coastguards and to the European Union border agency, Frontex, as well as returning to Turkey any migrants NATO crews rescue.

“Greek and Turkish forces will not operate in each other’s territorial waters and airspace,” NATO Secretary-General Jens Stoltenberg said in a statement, after ambassadors settled the details of a mission defense ministers announced on Feb. 11.

NATO diplomats said one of the issues was where Greek and Turkish ships should patrol, and whether that would set a precedent for claims over disputed territorial waters.

Stoltenberg said any NATO vessels, other than Greek or Turkish ships, would be able to sail in any territorial waters.

Germany, which has pushed the plan to complement an EU accord with Turkey to stem the flow of refugees arriving in Europe, hopes the mission will effectively seal the maritime border, although NATO says its crews will stop migrant boats only if they are in distress.

“NATO’s task is not to turn back the boats,” Stoltenberg said.

A NATO diplomat also played down German expectations that the mission could have a big impact on migrant flows, saying NATO ships would not be permanently on the busiest sea routes for migrants and may encounter relatively few migrant boats.

The mission will initially be led by Germany navy, which commands the fleet that NATO has sent to the Aegean.

German Chancellor Angela Merkel and Turkish Prime Minister Ahmet Davutoglu asked NATO to help tackle a crisis in which more than a million refugees arrived in Europe last year.

People-smuggling gangs made more than $6 billion last year, most of it from trafficking migrants into Europe, the EU’s police agency Europol said this week.

Unlike the EU’s mission off the Italian coast, which brings rescued migrants to Europe’s shores, NATO will return migrants to Turkey even if they are picked up in Greek waters, something NATO envoys reaffirmed at their meeting.

“In case of rescue of persons coming via Turkey, they will be taken back to Turkey,” Stoltenberg said.

One military official close to the talks said the aim was to have the mission fully operational before an EU-Turkey summit in Brussels on March 7. However, a NATO diplomat said that details still needed to be worked out.

The EU is relying on Turkey to help stem the flow of Syrians fleeing civil war, giving Ankara 3 billion euros ($3.3 billion) to set up centers and resettle refugees, although progress in implementing the deal has been slow.

Relations between Greece and Turkey have traditionally been tense and Greece’s defense minister this week accused Turkey of trying to undermine the NATO agreement.