Turkish President Recep Tayyip Erdogan has issued a harsh warning to Greece, saying the country would pay a "heavy price" if it continued to "harass" Turkish planes

Erdogan spoke during a rally in the Black Sea region, telling those in attendance to "look at history."

"If you go further, you will pay a heavy price," he said of Greece. "We have one thing to say to Greece: Remember Izmir," he added, referring to the city Turkey "liberated" from Greece in 1922 as part of its war of independence, according to state-run outlet Anadolu Agency. 

"When the time comes, we will do what is necessary," he continued. "As we say, all of a sudden, we can come overnight." 

TURKISH, GREEK TENSION PLACES PRESSURE ON NATO ALLIANCE

Erdogan’s comments may have come as a response to a remark from Greek Defense Minister Nikos Panagiotopoulos, who in June claimed that Turkey was "aware" of the "heavy cost" that Turkey faced in military engagements with Athens. 

Recep Tayyip Erdogan

ANKARA, TURKIYE - JUNE 2 : Turkish President Recep Tayyip Erdogan speaks during the High School Students Research Project Final Competition and Award Ceremony at Bestepe Peopleâs Congress and Culture Center in Ankara, Turkiye on June 2, 2022.  ((Photo by Mustafa Kamaci/Anadolu Agency via Getty Images))

"It is our capabilities that deter the other side from daring a military engagement, because they know the heavy cost that they would be forced to pay," he told the Manifesto newspaper. "Our armed forces are at all times vigilant, fully ready and decisive." 

DENMARK EXPECTS A WINTER FREE OF COVID RESTRICTIONS

Turkey has accused Greece of stationing troops on islands in the Aegean in violation of peace treaties between the NATO neighbors

The Greek island of Pserimos.

The Greek flag painted on a hill on Pserimos Island. Turkey claims Greece is violating international treaties by what it says is its militarization of its Islands in the eastern Aegean Sea. (Ali Balli/Anadolu Agency via Getty Images.)

"Your occupation of the islands does not bind us," Erdogan said.

POLAND TO SEEK $1.3 TRILLION IN WWII REPARATIONS FROM GERMANY: REPORT

Turkish Foreign Minister Mevlut Cavusoglu in June indicated that his country would challenge any Greek claims over the islands if they continued stationing troops throughout the region, the AFP reported. 

In this photo provided by Turkish Presidency, Greek Prime Minister Kyriakos Mitsotakis, left, talks to Turkish President Recep Tayyip Erdogan during their meeting in Istanbul, Turkey, Sunday, March 13, 2022. Mitsotakis is in Istanbul to talk with Turkish President Recep Tayyip Erdogan in a rare meeting between the neighbors who have been at odds over maritime and energy issues, the status of Aegean islands and migration. (Turkish Presidency via AP)

In this photo provided by Turkish Presidency, Greek Prime Minister Kyriakos Mitsotakis, left, talks to Turkish President Recep Tayyip Erdogan during their meeting in Istanbul, Turkey, Sunday, March 13, 2022. Mitsotakis is in Istanbul to talk with Turkish President Recep Tayyip Erdogan in a rare meeting between the neighbors who have been at odds over maritime and energy issues, the status of Aegean islands and migration. (Turkish Presidency via AP) (AP)

But Panagiotopolous insisted that Greece has not cut off "channels of communication," but noted that "dialogue is not consistent with aggressive rhetoric and provocative behavior." 

CLICK HERE TO GET THE FOX NEWS APP

"The Turkish president needs to understand that  … [Greece] will not cut corners in the defense of its sovereign rights," the minister said.