Updated

A group of senior international diplomats harshly criticized the European Union's deal with Turkey to send back migrants in return for financial aid, calling it a "bad example" to other countries.

The Elders, a global human rights group founded by the late Nelson Mandela, said the agreement between Brussels and Ankara was "morally dubious" and may be illegal under international law.

"It also sets a troubling precedent," the group said in a report published Tuesday , noting that the EU has proposed similar agreements with 16 other countries in Africa and the Middle East to prevent migrants from traveling to Europe.

Some of those countries, such as Sudan and Eritrea, had questionable human rights records, they said.

Former U.N. Secretary-General Kofi Annan said the agreement was an attempt to resolve the practical difficulties caused by a sudden influx of migrants, but warned that it risks compromising the rights of refugees.

Annan compared the trade-off to the way that civil liberties had been curtailed around the world after the 9/11 attacks.

The agreement with Ankara has sharply reduced the flow of migrants across the eastern Mediterranean in recent months.

Although Germany was a driving force behind the EU-Turkey deal, The Elders praised Chancellor Angela Merkel and her government for their "engagement and moral commitment" in the migrant crisis.

"It is an example the rest of Europe and the rest of the world should follow," Annan said.

The group urged countries to share the responsibility of hosting refugees fairly by committing to binding quotas.

Many European Union members, particularly in the east, oppose such quotas.

Lakhdar Brahimi, a former Algerian diplomat and member of The Elders, suggested that position was hypocritical in light of the expectations directed toward poorer countries.

"A lot of other Europeans are acting exactly against how they have been lecturing us," he said.