(Bloomberg) -- Greece and Turkey agreed to measures on Thursday to reduce the risk of an accidental military incident in the Eastern Mediterranean, where the two NATO members are engaged in a dispute over territorial waters.

The agreement comes as European Union leaders meet in Brussels to discuss Turkish energy exploration activities in the contested region. The row has raised concern about a military confrontation between Turkey and Greece, which have key positions on NATO’s southeastern flank.

The two countries agreed to a mechanism, established at the headquarters of the North Atlantic Treaty Organization in the Belgian capital, that includes a hotline to avoid sea or air conflicts, according to a statement on the NATO website.

“This safety mechanism can help to create the space for diplomatic efforts to address the underlying dispute and we stand ready to develop it further,” NATO Secretary General Jens Stoltenberg said in the statement.

Tensions between the regional rivals soared this summer after Turkish ships launched energy surveys and naval exercises in waters where Turkey and Greece both assert exclusive economic rights, and began exploring for natural gas off the divided island of Cyprus.

Greece says that islands must be taken into account in delineating a country’s continental shelf, in line with the United Nations Law of the Sea, which Turkey has not signed. Ankara argues that a country’s continental shelf should be measured from its mainland, and that the area south of the Greek island of Kastellorizo -- just a few kilometers off Turkey’s southern coast -- therefore falls within its exclusive zone.

Turkey and Greece agreed last month to resume exploratory talks in Istanbul aimed at resolving the territorial disputes. The resumption of discussions was mediated in part by German Chancellor Angela Merkel.

The EU has threatened sanctions against Turkey over its maritime claims, and member state Cyprus is pressing for an expanded blacklist of Turkish entities. Cyprus has refused to sign off on sanctions against the regime in Belarus unless other member states also agree to expand the Turkish sanctions list.

“Our relationship with Turkey is naturally very complex and, even with all the difficulties, there is a strong interest for the European Union to develop a truly constructive relationship with Turkey,” Merkel told reporters before the summit in Brussels. “We are committed to finding a peaceful solution to the tensions.”

©2020 Bloomberg L.P.