“There are outstanding issues with the Treaty of Lausanne and matters that have not been addressed correctly,” a stony-faced Mr. Erdogan said. It should be “updated,” he added.
Mr. Pavlopoulos, clearly uncomfortable, immediately countered that the treaty was “nonnegotiable.” The Greek news media condemned the Turkish leader’s stance as “provocative” and “unprecedented.”
Mr. Erdogan has been raising the issue of the Lausanne Treaty since last year’s failed coup, calling it unfair, a public stance that is considered provocative not only toward Greece, but even in Turkey because it questions the very legitimacy of the republic that was established on the foundations of the treaty.
He has emphasized the unfairness of the treaty that handed islands close to Turkey’s shores to Greece, and raised concerns about the Turkish community in Greece, which is known officially as a Muslim minority rather than as ethnic Turkish.
Mr. Erdogan, who appeared to be a liberal pro-European democrat in his early years as leader, has increasingly adopted a nationalist, neo-Ottoman posture in recent years, presenting himself as a leader who can recreate some of Turkey’s lost empire.
In a speech last year at the presidential palace, he similarly criticized the treaty and those who negotiated it.
“They tried to sell us Lausanne, as a victory,” he said at that time. “Look now to the Greek islands. We gave away these very near islands. Is it a victory? Those places were ours. Why? Those seated at the table were not up to challenge. Because they could not deliver, now we are having problems.”
After Mr. Erdogan picked up the theme on Thursday, Prime Minister Alexis Tsipras of Greece told him that he was eager to “build bridges, not raise walls,” and he underlined the need for “respect for international law, treaties and of the territorial integrity of countries.”
Mr. Erdogan indicated that border changes were not what he had in mind, declaring that Turkey “never covets the territory of another country.”
But it was hard for the Greeks to interpret Mr. Erdogan’s remarks on the Lausanne Treaty any other way. Mr. Erdogan’s insistence on calling the Muslim minority in Greece a “Turkish minority,” as Turkish officials have done for years, is regarded by Greece as suggesting territorial aspirations.
Mr. Erdogan called on Greek authorities to drop “ideological fixations,” and to expand the rights of the Muslims living in Thrace, in northern Greece, which he is to visit on Friday.
Muslims there, he said, should be able to elect their own religious leaders, rather than have them appointed by the Greek state. Denying Muslims in Greece the right to appoint their own muftis is a violation of the Lausanne Treaty, he said.
Mr. Erdogan also repeated demands for the extradition of eight members of the Turkish armed forces who fled to Greece in a military helicopter after a failed Turkish coup last year.
The men have applied for asylum in Greece, and Greece’s highest court rejected their extradition in January. Since July 2016, Greece has reported a surge in asylum requests by Turkish citizens, with nearly 1,000 applications submitted.
The mood of the visit and the exchanges did little to advance relations between the two Mediterranean neighbors, which have been antagonistic for much of the past century, since the end of the nearly 400-year Ottoman occupation of Greece.
A territorial dispute in 1996 over a small islet in the Aegean brought them close to war. There was a brief truce in 1999 when Greece and Turkey sent humanitarian aid to each other following earthquakes in each country.
Turkey’s negotiations to join the European Union, which started in 2005, also brought them closer, but the two nations continue to have disagreements, chiefly over borders and territory.
Among those disputes is the stalled peace process over Cyprus, which has been divided into Greek and Turkish areas since the Turkish invasion of 1974.
Another point of contention are the waves of immigrants that continue to reach Greece from Turkey, despite an agreement between the European Union and Ankara last year that was aimed at curbing human trafficking across the Aegean.
Mr. Erdogan criticized the European Union for promising 3 billion euros to manage the refugee crisis, but only disbursing €850 million, saying Turkey has three million refugees in its territory.
Mr. Tsipras said that Greece, a much smaller country, had struggled to host hundreds of thousands of migrants arriving from neighboring Turkey. However, he said the two leaders had agreed on ways to work together more effectively in tackling the refugee crisis, without specifying how.
Economic relations were also on the agenda during Mr. Erdogan’s visit, with a focus on the energy, trade and transport sectors. Three large projects — a border bridge, ferry connections and a high-speed train connection — are already in the works.
But much of the hopes that those projects might deepen ties faded in the terse exchanges on Thursday.
Ilter Turan, professor of International Relations at Bilgi University in Istanbul, said he was trying to understand why Mr. Erdogan would call for any change to the treaty since it was the founding document of the Turkish republic.
“I would imagine Turkey would be the one to say it was nonnegotiable,” he said, given the sanctity of the treaty to Turkey’s republic. “It applies the law equally to people of different beliefs, and there are mutual obligations to respect minorities.”
Security was tight for the visit, with more than 2,800 police officers on duty in the Greek capital, and Mr. Erdogan was said to be traveling with some 200 security guards and special agents.
Before Mr. Erdogan’s visit, the Greek police arrested nine Turkish citizens suspected of being linked to the Revolutionary People’s Liberation Party-Front, an extreme leftist group, in Athens last week.
The eight men and one woman, accused of hoarding explosives in Greece, deny any wrongdoing. The group has been designated a terrorist organization by Turkey, and it is known to have a presence in Greece.
Mr. Erdogan visited Greece as prime minister in 2004 and 2010, and Prime Minister Binali Yildirim visited in June. But no Turkish president had visited since Celal Bayar in 1952.