Migrants say they were held at a camp, raped, and tortured before embarking for Europe on a boat that capsized off the Italian island of Lampedusa, killing more than 365.

Mouhamud Elmi Muhidin, 24, an alleged member of the gang that trafficked them, was arrested by Italian authorities on October 25, accompanying another group of migrants onto Lampedusa, which is close to the North African coast.

As he arrived, he narrowly escaped being lynched by a group of survivors from the capsized craft who claimed to recognise him, before he was taken into custody by police.

Authorities said they were not sure why he had come to Europe so soon after the deaths, which caused international outrage, but that he may have been fleeing conflict inside a criminal gang, a police source told the AFP.

According to the testimony of survivors, who are mostly Eritrean or Somali, they were held in a detention centre in Sabha, southwest Libya, in conditions Italian prosecutor Maurizio Scalia has likened to those of "a concentration camp".

The 20 women in the group claim they were raped, sexually assaulted and passed on to Libyan militiamen and Sudanese traffickers "as if they were a cup of tea," reported Italian newspaper La Repubblica.

"They forced us to watch our men being tortured with various methods including batons, electric shocks to the feet. Whoever rebelled was tied up," read the testimony of a 17-year-old Eritrean girl in the investigation.

Migrants were held until they paid the $3,500 to buy their freedom and continue the journey to gain illegal entry to Europe.

"The women who could not pay were assaulted," the girl was quoted as saying in her criminal charge, and claims that Muhidin was one of a group of men who raped her.

"They threw me on the ground, held down my arms and covered my mouth, and poured gasoline on my head, which burned my scalp, skin and eyes," she said through a translator. "And then, not yet happy, the three took turns raping me."

Thousands of migrants, desperate for a life of relative prosperity in Europe, pay criminal gangs to transport them across the Sahara to the North African coast annually.

Since the fall of president Muammar Gaddafi in 2011, Libya has become the most popular point for traffickers to ferry them across the Mediterranean.

Since the Lampedusa incident, Italian authorities have stepped up patrols and even used drones to try and head off boats of migrants before they reach the coast.

The Italian government claims that up to 35,000 illegal immigrants enter the country every year, and has requested additional EU funding to help them cope with the problem.

Muhidin has been taken to Palermo in Sicily, where he faces charges relating to kidnapping, sexual violence and people smuggling.

The alleged captain of the boat that capsized, a Tunisian man named Khaled Bensalam, is also being held in Sicily.