Turkish President Recep Tayyip Erdogan has urged the European Union to open talks on aspects of Turkey's bid to join the EU, warning that otherwise Ankara would have nothing to discuss with the bloc and would say "goodbye."

Erdogan's comments came after EU Enlargement Commissioner Johannes Hahn said on May 2 that Turkey under Erdogan has turned its back on joining the EU.

Erdogan made the remarks during a ceremony in Ankara to celebrate his return to membership of the Islamic-rooted Justice and Development Party (AKP).

"From now on there is no option other than opening the chapters you have not yet opened," Erdogan said.

He said that if the EU did not open those chapters -- a reference to specific aspects of the accession process -- then "goodbye."

Meanwhile, Turkish Foreign Minister Mevlut Cavusoglu announced on May 2 that Erdogan planned to meet with top EU officials on the sidelines of a NATO summit in Brussels later in the month.

Erdogan previously confirmed that he would attend the May 24-25 NATO summit.

Erdogan has been at the helm of Turkey since 2003, first as prime minister and, since 2014, as president.

Erdogan's rejoining of the ruling AKP follows his narrow victory in last month's referendum boosting the powers of the president.

Most of the constitutional changes approved in the April 16 referendum will take effect after the November 2019 election.

But an amendment that reverses a requirement for the president to be nonpartisan and cut ties with his or her party came into effect immediately, allowing Erdogan to return to the AKP.

The party is expected to reelect Erdogan as its chairman at an extraordinary congress on May 21.

Tension between Erdogan and the EU was already high because of European concerns that he was trampling on rights and punishing opponents in a clampdown after a failed coup attempt against him in July 2016.

Those strains increased during the campaign for the referendum, when Turkey clashed with several countries that hindered his efforts to rally support for the constitutional changes among Turks living abroad.

Erdogan labeled the actions of some Western leaders such as German Chancellor Angela Merkel and Dutch Prime Minister Mark Rutte as "fascist" and accused them of behaving like "Nazis" after Turkish government officials were prevented from campaigning in favor of the referendum among the Turks living abroad.

Turkey applied to become a member of European Economic Community, the predecessor of the European Union, in 1987 and opened membership negotiations with the EU in 2005.

But progress has been slow, with 16 out of 35 negotiations chapters opened and only one chapter completed.

Accession negotiations have effectively come to a halt after Erdogan's government instituted a state of emergency following the failed coup attempt.

The state of emergency, which is still in force, has allowed the Turkish government to rule by decree. More than 47,000 people have been arrested and 100,000 have been purged from the police, army, and other institutions for alleged connections to terrorist organizations.

In November, the European Parliament put negotiations with Turkey on hold over human-rights and rule-of-law concerns, though the move was not binding. In December, the EU said it would open no new areas in Turkey's membership talks in the "prevailing circumstances."

In a debate at the European Parliament on May 2, the author of the parliament's annual report on Turkey called on the EU to suspend the accession process for Turkey if the constitutional changes backed in the referendum are implemented without changes.

Kati Piri, a Dutch social democrat, said that with "such a constitution it is clear that Turkey cannot become a member of the European Union.”

During his speech on May 2, Erdogan also touched upon the situation in Syria, saying he would discuss possible operations in Syria's Manbij and Raqqa with Russian President Vladimir Putin during an official visit to Russia on May 3, and with U.S. President Donald Trump later this month.

He also said Turkey would not allow Kurdish militant groups to achieve their goals in northern Syria.

Turkey considers the Syrian Kurdish People's Protection Units (YPG) a branch of the outlawed Kurdistan Workers Party (PKK), which has waged a three-decade insurgency against the Turkish state for Kurdish autonomy.

Relations between Ankara and Washington have recently been strained over U.S. support for the YPG in the fight against the Islamic State extremist group in Syria.

With reporting by Rikard Jozwiak in Brussels, Reuters, AP, AFP, and dpa