Turkish President Recep Tayyip Erdogan today warned Brussels that Turkey would bring the curtain down on its over half-century bid to join the European Union if new accession chapters were not opened.

Mr. Erdogan’s threat to say “goodbye” to the European Union came minutes after he rejoined Turkey’s ruling party in the first major change to come into effect following a controversial vote to boost his powers.

Relations between Ankara and Brussels have tumbled to unprecedented lows following a failed coup bid on July 15.

The EU is troubled by the state of human rights in Turkey, while Turkey is slamming what it sees as a lack of solidarity from the bloc.

Mr. Erdogan last month narrowly won a referendum on sweeping consitutional changes to create a presidential system. But the victory was contested by the opposition and gained only the most tepid of welcomes in Brussels.

“There is no option other than opening chapters that you have not opened until now,” Erdogan said, referring to the individual policy areas that need to be concluded before Turkey joins the EU.

“If you open, then great. If you don’t open, then goodbye,” Mr. Erdogan said. “Turkey is not their [the EU’s] doorman,” he added.

Sixteen chapters have been opened out of a total of 35 since accession talks began in October 2005, although Turkey’s bid to be a part of the bloc dates back to the 1960s.

“First you have to handle these chapters and fulfil your promises. Then we will sit at the able and talk. Otherwise, we have nothing left to discuss with you,” Mr. Erdogan said.

Some EU states —— led by Austria —— have suggested that membership talks should be frozen. But EU foreign affairs chief Federica Mogherini said on Friday that talks had not been halted.

Germany has urged its EU peers not to end accession talks despite deep misgivings over Turkey’s rights record, saying the country is key to European interests, not least as a NATO ally.

German Foreign Minister Sigmar Gabriel said on Friday Berlin was “strictly against breaking off the accession talks... It would be the completely wrong reaction.”

EU President Donald Tusk and European Commission President Jean-Claude Juncker want to meet with Erdogan when he travels to Brussels for the NATO summit on May 25 despite the growing tensions.

Mr. Erdogan, who on Monday returned from a visit to India, will however first be visiting Russia, China and United States in an indication of Turkey’s priorities.

Mr.Erdogan made the remarks in a key policy speech that followed his formal return to the ruling Justice and Development Party (AKP) that he co-founded.

Under Turkey’s former constitution, the head of state had to sever ties with their political party and Mr. Erdogan had to leave the AKP when he became President in August 2014 after more than a decade as Premier.

The reforms permit the President to be a member of a political party, allowing Mr. Erdogan to return to the AKP which he co-founded in 2001 as a new Islamic-rooted force in Turkish politics and which has dominated the scene ever since.

Supporters of the changes say they will bring Turkey efficient governance but opponents fear they will set the country on the path to authoritarian rule.

Mr. Erdogan was welcomed as a new member at a special ceremony at party headquarters in Ankara attended by hundreds of AKP officials led by Prime Minister Binali Yildirim.

He signed the paperwork to become a member to thunderous applause before a rendition of the national anthem.

Mr. Yildirim confirmed that Mr. Erdogan will also be reinstalled as party chairman on May 21 at an extraordinary AKP congress.

Mr. Erdogan, who has four children, has described the AKP as his “fifth child” and has never made a secret of his desire to return to the fold.

“I was forced to leave the party I co-founded, my home, my love. This longing is thankfully coming to an end,” he told the officials, some of whom were in tears.

“I am a member of my party again. This was just an official separation. Our hearts are together, always together.”

He is keen to sharpen the party’s performance ahead of polls scheduled for 2019 after the ‘No’ vote came out on top in key battlegrounds including Ankara and Istanbul in the April 16 referendum.

The new constitution envisages major changes including the abolition of the premier’s post and giving the head of state power to appoint ministers.

But these changes will only come into force after elections scheduled for November 2019 and the party membership shift is one of the few measures to take effect before then.