PRAGUE (AP) — The leaders of historic foes Turkey and Armenia on Thursday held their first face-to-face meeting since the two countries agreed to improve relations.

Turkish President Recep Tayyip Erdogan and Prime Minister Nikol Pashinyan met in Prague on the sidelines of a summit by the leaders of 44 countries to launch a European Political Community aimed at boosting security and economic prosperity across Europe. Azerbaijani President Ilham Aliyev was also present at what appeared to be an informal gathering of the three leaders.

Later, Erdogan and Pashinyan led bilateral talks between their countries’ delegations.

“I sincerely believe that we will achieve full normalization (of relations) on the basis of good neighborly relations,” Erdogan later told journalists, adding that the meeting was held in a “friendly atmosphere.”

Turkey and Armenia, which have no diplomatic relations, agreed last year to start talks aimed at putting decades of bitterness behind and reopen their joint border. Special envoys appointed by the two countries have held four rounds of talks since then. Their discussions have resulted in an agreement to resume charter flights between Turkey’s largest city, Istanbul, and the Armenian capital of Yerevan.

Erdogan said Armenia made some demands during the talks, but did not elaborate. The two countries’ special envoys and foreign ministers would continue with their efforts toward normalization, he said.

“We don’t have any preconditions,” Erdogan said. “We just said (to them), ‘Make sure the relations between you and Azerbaijan come to a certain level of maturity and come to a peace agreement.’”

Turkey, a close ally of Azerbaijan, shut down its border with Armenia in 1993 in a show of solidarity with Baku, which was locked in a conflict with Armenia over the Nagorno-Karabakh region.

In 2020, Turkey strongly backed Azerbaijan in the six-week conflict with Armenia over Nagorno-Karabakh, which ended with a Russia-brokered peace deal that saw Azerbaijan gain control of a significant part of the region.

Turkey and Armenia also have a more than century-old hostility over the deaths of an estimated 1.5 million Armenians in massacres, deportations and forced marches that began in 1915 in Ottoman Turkey.

It is Ankara and Yerevan’s second attempt at reconciliation. Turkey and Armenia reached an agreement in 2009 to establish formal relations and to open their border, but the agreement was never ratified because of strong opposition from Azerbaijan.

Last month, Armenia and Azerbaijan negotiated a cease-fire to end a flare-up of fighting that killed 155 soldiers from both sides.