“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.”
Prime Minister Alexis Tsipras of Greece later told Mr. Erdogan 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.”
He also called on Greek authorities to drop “ideological fixations,” and to expand the rights of 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 insisted on calling the Muslim minority in Greece a “Turkish minority,” as Turkish officials have done for years, a point Greece regards as suggesting territorial aspirations and, as such, unacceptable.
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, claiming that Mr. Tsipras had promised that the service members would be returned just a few days after they landed on Greek soil.
The men were granted asylum after 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 and exchanges of the visit 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 Europe Union, which started in 2005, also brought them closer, but the two nations continue to have disagreements, chiefly over territory.
Other points of contention include the stalled peace process over Cyprus, which has been divided into a Greek and a Turkish area since the Turkish invasion of 1974, and the waves of immigrants that continue to reach Greece from Turkey, despite an agreement between the European Union and Ankara last year aimed at curbing human trafficking across the Aegean.
Before Mr. Erdogan’s visit, the Greek police arrested nine Turkish citizens suspected of being linked to the extreme leftist group the Revolutionary People’s Liberation Party-Front 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.
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.
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.
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.