Spanish authorities have charged five people suspected of kidnapping undocumented migrants arriving from Morocco and holding them for ransom.
The group, most of them Moroccan by origin, would go to the Algeciras area and pick up victims coming off boats, the Civil Guard say.
Victims would be selected based on how likely they would fetch a ransom of between €500 and €2,000 (£430-£1,750).
Algeciras, near Gibraltar, is commonly used as a crossing point by migrants.
The gang allegedly waited on boats to arrive on the shore near the port, promising to help migrants find family members in Spain.
Victims were then allegedly taken to a house in a nearby neighbourhood where they were kept in rooms and forced to give up personal items.
They would allegedly be interrogated by their captors to establish their financial value and heir relatives would be contacted with ransom demands.
The suspects are three men and a woman originally from Morocco, with residency in Spain, and a woman with Spanish citizenship.
The men allegedly carried out the kidnappings and extortion while the women are said to have kept watch over the captives.
All five have been remanded in custody without bail.