A contubernium was a quasi-marital relationship in ancient Rome between a free citizen and a slave or between two slaves. A slave involved in such relationship was called contubernalis.
The term describes a wide range of situations, from outright sexual slavery to quasi-marriage. For instance, according to Suetonius, Caenis, a slave and secretary of Antonia Minor, was Vespasian's wife "in all but name", until her death in AD 74. It was also not uncommon for slaves to create family-like unions, allowed but not protected by the law.
In the Roman legal system, a slave did not have a family. If a slave man entered into a contubernium with a free woman, the children were born free "iure gentium". If instead the man was free but the woman was a slave, the children were born slaves. The law also allowed a slave-owner to free the slave and enter into a concubinage or a regular marriage.
A Roman could exploit his own slaves for sex, but was not entitled to compel any enslaved person he chose to have sex, since the owner had the right to control his own property. In the pursuit of sex with a slave who belonged to someone else, persuasion or threats might be employed. A contubernium was allowed also between two slaves that belonged to two different owners. However, it was contestable between a free woman and another citizen's male slave. The Senatus consultum Claudianum established in fact that if after three warnings from the slave's owner the free woman did not cease her sexual relationship with their slave she would become a slave to the same owner too. The purpose of this law was not that of regulating the free woman's morality, but that of protecting private property and maximizing the male slave's productivity.
Since a slave lacked the legal standing that protected a citizen's body, a charge of rape could not be brought against a free citizen who forced another citizen's slave to have sex; however the slave owner could prosecute the rapist under the Lex Aquilia, a law pertaining to property damage.
If a quasi-marital relationship did not involve slaves but only free citizens it was called concubinage (concubinatus) and benefited of some protection from the law. Among free citizens concubinage seems to have been prevalent in couples in which one member was a freed citizen more often than in couples where both members were freeborn citizens. Among couples where both members were freeborn citizens regular marriage remained the prevalent institution.
It is impossible to know with certainty how many slaves have been at least once in their life involved in a contubernium. According to a sample of 260 recorded contubernia, excluding the cases were both persons were slaves, there was a neat prevalence of relationships where the woman was the free citizen and the man was the slave. As noticed by the author of the study,
For a free woman of a certain class (e.g. the daughter of an imperial freedman) to marry an upwardly-mobile slave civil servant was to her advantage. A woman slave had no status connected with her job which would attract a free husband. (Women in the familia Caesaris usually married fellow slaves.) Secondly, there was a grave disadvantage of a slave wife. If a slave man "married" a free woman, the children were born free iure gentium (with exceptions introduced by the Senatus consultum Claudianum and sometimes applied). But a slave woman with a free husband (with a few exceptions) bore slave children.