Greek lawmakers on Thursday ratified a controversial maritime agreement with Egypt on boundaries in the Eastern Mediterranean.

The vote on the deal came on the heels of visits Monday by German Foreign Minister Heiko Maas to Greece and Turkey, encouraging both countries to engage in dialogue to avoid conflict in the region.

Apparently seeking to block Turkey's legitimate maritime territorial claims, Greece signed an exclusive economic zone (EEZ) deal with Italy on June 9 and with Egypt on Aug 7.

The Turkish Foreign Ministry slammed the latter in a statement, asserting that Greece and Egypt share no sea borders and that the deal is "null and void."

It added that the demarcated area in the pact is located on Turkey's continental shelf, as Ankara has reported to the UN.

Turkey has long opposed efforts of various countries to exclude it from its rightful maritime jurisdiction, despite having the longest coastline in the Eastern Mediterranean.

The efforts have especially tried to deprive Turkey of its rights to explore energy resources in the region, which Turkey has encouraged the fair sharing of by regional countries.

Turkey and Libya signed a landmark deal last November laying out maritime boundaries between the two countries.

Turkish president, NATO chief discuss E.Med on phone

Turkey's president Friday spoke to the NATO head over the phone, with the latest developments in the Eastern Mediterranean discussed, the Turkish authorities said.

In the phone call with Jean Stoltenberg, Recep Tayyip Erdogan stressed that Turkey supports a fair solution in the Eastern Mediterranean with win-win for all countries, Turkey’s Directorate of Communications said in a statement.

NATO must fulfill its responsibility to prevent unilateral steps that ignore the international law and damage regional peace, Erdogan said.

Turkey will always continue to protect its rights and interest everywhere, the president vowed.

Greece has disputed Turkey's current energy exploration in the Eastern Mediterranean, trying to box in Turkish maritime territory based on small islands near the Turkish coast.

Turkey -- the country with the longest coastline on the Mediterranean -- has sent out drill ships to explore for energy on its continental shelf, saying that both Turkey and the Turkish Republic of Northern Cyprus (TRNC) have rights in the region.