ANKARA, Turkey (AP) — Turkey on Monday accused Greece of “piracy” and warned it will stand up to Athens’ alleged efforts to militarize islands near its coast, following claims that the neighbouring country was building up troops on one such island in violation of treaties.

Despite mediation efforts by Germany, NATO allies Turkey and Greece are locked in a dangerous standoff over maritime boundaries and offshore energy exploration rights, which was sparked when Turkey sent a research ship, accompanied by warships to search for gas and oil reserves. The two neighbours have been engaged in competing military exercises at sea in recent weeks.

 A member of the European Union, Greece claims the waters are part of its continental shelf and has enlisted the support of the 27-nation bloc, which has condemned Turkey’s “illegal activities” and warned of potential sanctions against Ankara.

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

Greece and Cyprus have recently been joined by France, Italy and the United Arab Emirates in carrying out naval and aerial war games in the region.

Ratcheting up the rhetoric, Turkish President Recep Tayyip Erdogan said Sunday that his country of ready to pay the price for its efforts to defend Turkey’s rights in the eastern Mediterranean. He asked whether the people of Greece and France were ready to make the same sacrifices due to the “greed and incompetence” of their leaders.

On Monday, Turkish ruling party spokesman Omer Celik commented about media reports claiming that Greece had clandestinely sent soldiers to the island of Kastellorizo, located around 600 kilometres (370 miles) from the Greek mainland and two kilometres (1.25 miles) from the Turkish coast, denouncing the alleged move as “a new example of piracy.”

“Pointing guns toward Turkey’s coasts is foolishness,” he warned.

Turkish Foreign Ministry spokesman Hami Aksoy said late Sunday that if the reports were true, then the move would amount to a violation of a 1947 treaty and “a new indication of Greece’s unlawfulness and its true intentions in the Eastern Mediterranean.

“We emphasize that we will not allow such a provocation to achieve its purpose, right across our coasts,” Aksoy said. “If it continues to take steps that increase the tension in the region, the loser would be Greece.”

There was no immediate comment from the Greek government. Greek defence officials said that soldiers were sent to Kastellorizo as part of a regular rotation and that there was no military buildup on the island.

Greek officials argue that Greece does have the right to deploy defensive forces when under threat, adding that Turkey isn’t a signatory of the 1947 treaty ceding the southeast Aegean islands to Greece.