German Foreign Minister Heiko Maas appealed to NATO allies Greece and Turkey on Tuesday to enter a dialogue and de-escalate military tensions in the eastern Mediterranean, warning of an “abyss” if their dispute is not resolved peacefully. But rhetoric remained high, with Turkey’s top diplomat warning that if Greece takes “wrongful steps,” Ankara will “do the necessary without any hesitation.”

Maas conducted shuttle diplomacy between Athens and Ankara in a bid to mediate between the neighboring countries who are locked in an acrimonious dispute over maritime boundaries and offshore energy rights. Both have sent warships to shadow each other and announced military exercises within a broad area between Crete and Cyprus where Turkey has a vessel conducting research. His visits came ahead of a meeting of EU foreign ministers in Berlin later this week, at which Turkey will be discussed. Germany holds the rotating EU presidency.

“What we really need is a willingness for dialogue,” Maas said during a joint news conference with his Turkish counterpart, Mevlut Cavusoglu. “A further escalation is not in the interest of Greece, not in the interest of the EU and also not in the interest of Turkey.” “The situation is very risky,” Maas warned. “Whoever moves closer and closer to the abyss can at some point fall down. That’s a development which we want to avoid.”

He added: “Nobody wants to solve this conflict militarily, which would be absolute insanity .. but the willingness for dialogue is there.” In Athens earlier, Maas warned after a meeting with Greek Foreign Minister Nikos Dendias that “any spark, however small, could lead to a disaster.” “No one can have an interest in that, and certainly not in a military confrontation between NATO partners and neighbors,” Maas said.

The Turkish vessel Oruc Reis has for weeks been carrying out seismic research escorted by Turkish warships. Greece, which says the ship is operating over the country’s own continental shelf in an area where it has exclusive rights on potential undersea gas and oil deposits, sent warships to shadow the Turkish flotilla.

Turkey disputes Greece’s claims, insisting that small Greek islands near the Turkish coast should not be taken into account when delineating maritime boundaries. Ankara accuses Athens of trying to grab an unfair share of the eastern Mediterranean’s resources.

Turkey is also prospecting for hydrocarbons in waters where Cyprus claims exclusive economic rights. On Tuesday, both Greece and Turkey signaled readiness for dialogue but blamed each other for the tensions.

“Turkey is ready to hold talks with everyone for the fair sharing (of resources),” Cavusoglu said. “Turkey has always supported dialogue with Greece and has been in favor of resolving problems through diplomacy, not conflict.”