ANKARA, Turkey — Comments by Turkish President Recep Tayyip Erdogan questioning a historic treaty that defined Turkey’s current-day borders have sparked anger inside Turkey and in Greece.

Erdogan suggested in an address on Thursday that the 1923 Treaty of Lausanne, which Turkish nationalists negotiated with the Allies, cannot be considered a “victory” because Turkey had lost to Greece several islands near its coast that were part of the Ottoman Empire.

His words angered Turkey’s main opposition party, whose late leader negotiated the treaty. It argued Lausanne had reversed the stiff conditions of a previous treaty that had been negotiated by Ottoman leaders.

In Greece, Defense Minister Panos Kammenos said Friday: “Efforts to cast doubt on international treaties┬álead to dangerous paths.” He urged Turkey not to “pursue” those paths.