Bagnio is a loan word into several languages (from Italian: bagno). In English, French, and so on, it has developed varying meanings: typically a brothel, bath-house, or prison for slaves.
The origin of this sense seems to be a prison in Livorno, built on former baths, or a prison for hostages near a bath-house in Constantinople. Thereafter it was extended to all the slave quarters in the Ottoman Empire and the Barbary regencies. The hostages of the Barbary pirates slept in the prisons at night, leaving during the day to work as laborers, galley slaves, or domestic servants. The communication between master and slave and between slaves of different origins was made in a lingua franca known as Sabir or Mediterranean Lingua Franca, a Mediterranean pidgin language with Romance and Arabic vocabulary.
The Slaves' Prison in Valletta, Malta, which was both a prison and a place where Muslim slaves slept at night, was known as the bagnio or bagno.
Bagnio was a term for a bath or bath-house. In England, it was originally used to name coffeehouses that offered Turkish baths, but by 1740 it signified a boarding house where rooms could be hired with no questions asked, or a brothel.
Bagne became the word for the prisons of the galley slaves in the French Navy; after galley service was abolished, the word continued to be used as a generic term for any hard labour prison. The last one in European France, the Bagne de Toulon, was closed in 1873.
The penal colony on Devil's Island in French Guiana, which was not shut down until 1953, was also called a bagne, and features in the famous bestseller Papillon.
El trato de Argel (Life in Algiers, 1580), Los baños de Argel (The Bagnios of Algiers, 1615), El gallardo español (The Gallard Spaniard, 1615) and La gran sultana (The Great Sultana, 1615) were four comedies by Miguel de Cervantes about the life of the galley slaves, called "caitiffs". Cervantes himself had been imprisoned in Algiers (1575–1580). His novel Don Quixote also features a subplot with the story of a caitiff (chapters 39-41 of the first part).
A bagnio, in reference to a brothel or boarding house, is mentioned in The Private Memoirs and Confessions of a Justified Sinner (1824) by James Hogg as the location of a quarrel between two young Edinburgh nobleman that precedes one of them being murdered and the other arrested for the crime.
In The Day of the Locust (1939) by Nathanael West, Claude Estee's wife, Alice, says "Nothing like a good bagnio to set a fellow up."
Frequent mention of a bagnio is made in A Maggot (1985) by John Fowles, set in 1736 and mainly written in the English of that time. In Fowles' novel, the term denotes a brothel, specifically the one run by 'Mistress Claiborne'.
D'Italie où il signifie à l'origine « bain » (lat. balneum, bain*), l'établissement pénitentiaire de Livourne étant construit sur un anc. bain (Esn., Bl.-W.5), le terme passa en Turquie (spéc. à Constantinople où les prisonniers chrét., en grande partie ital. dénommèrent l'établissement bagno pour la même raison,[...]