European Commission head Jean-Claude Juncker said that the EU's deal with Turkey on halting the flow of migrants towards the bloc is at risk of breaking down, in comments published Friday.

"The risk is big. The success so far of the pact is fragile. President (Recep Tayyip) Erdogan has already hinted several times that he wants to scrap it," Juncker told Austrian daily Kurier.

"(If that happens) then we can expect migrants to start coming to Europe again," he told the paper in an interview to be published on Saturday.

The March accord between the European Union and Turkey succeeded in stemming the flow of migrants but there are concerns that it could fall apart after a failed coup against Erdogan on July 15.

A subsequent purge in Turkey has seen thousands of arrests among the army, the police and judiciary, and hundreds have lost their jobs in every major Turkish ministry.

Three days after the attempt on the government, a group of Turkish officials assigned to monitor the migration deal on the Greek side returned home, and have yet to be replaced.

In a wide-ranging interview, Juncker also said he was "very concerned" about developments within the 28-nation EU, particularly with regard to Poland and Hungary.

"In Poland the government's course of action has damaged the rule of law... I am watching with concern preparations for Hungary's referendum on migration," Juncker was quoted as saying.

On Wednesday the European Commission handed Poland's right-wing government a three-month deadline to reverse changes to its Constitutional Court or face sanctions for breaching EU norms on the rule of law and democracy.

The move by the EU's executive arm is the second step in an unprecedented procedure which could eventually see Warsaw's voting rights suspended in the Council of Ministers, the EU's highest decision-making body.

Hungary meanwhile has refused to accept a single migrant under a mandatory EU quota plan to share them around the bloc, and will hold a referendum on the scheme on October 2.

Right-wing Prime Minister Viktor Orban this week called migration "poison" for Europe and said that his country "does not need a single migrant".

"If referendums are going to be organised on every decision of the Council of Ministers and the European Parliament, then legal security is in danger," Juncker said.

"The Commission should really -- although we're not that far yet -- launch a breach of treaty procedure against Hungary. Mr Orban though would then claim that the Commission is taking the Hungarian people to court."