By David Willey
BBC News, Rome
Italy and Libya have been accused of abusing the human rights of African migrants trying to enter the EU.
Human Rights Watch says Italy violated international law
The New York-based Human Rights Watch (HRW) group says Libyan and Italian authorities have forcibly repatriated thousands of foreigners.
Some of those faced possible persecution or torture in their home countries, HRW says in a new report.
The group says the Italian deportations took place under former Prime Minister Silvio Berlusconi.
The detailed 135-page report documents how the Libyan authorities forcibly repatriated about 145,000 foreigners between 2003 and 2005.
Many of them were submitted to beatings and arbitrary arrest.
Those forcibly returned to Eritrea or Somalia faced possible persecution or torture, Human Rights Watch said.
Bill Frelick, the Director of Refugee Policy for Human Rights Watch, said Libya is not a safe country for migrants, asylum seekers or refugees.
He accused the European Union of working with Libya to block people from reaching Europe rather than helping them to get the protection they need.
There is no asylum law in Libya, a country of just over five million people, which has more than a million foreigners living in the country without proper documentation.
Human Rights Watch castigated Italy also for flouting international law by carrying out mass deportations of refugees who did manage to cross the Mediterranean in small boats to the Italian island of Lampedusa near Sicily.
More than 2,800 mainly African refugees were shipped or flown back to Libya during the former government of Mr Berlusconi without being allowed to file asylum claims.
The Italian authorities refused permission for officials of the NGO to visit the detention centre on Lampedusa, where eyewitnesses have reported overcrowding and physical abuse by guards.
But Human Rights Watch said the new Italian government, led by Romano Prodi, has now halted collective expulsions and recognises that Libya is not a safe place for migrants to be returned.