Various types of same-sex marriages have existed, ranging from informal, unsanctioned relationships to highly ritualized unions.
In the southern Chinese province of Fujian, through the Ming dynasty period, females would bind themselves in contracts to younger females in elaborate ceremonies. Males also entered similar arrangements. This type of arrangement was also similar in ancient European history.
An example of egalitarian male domestic partnership from the early Zhou Dynasty period of China is recorded in the story of Pan Zhang & Wang Zhongxian. While the relationship was clearly approved by the wider community, and was compared to heterosexual marriage, it did not involve a religious ceremony binding the couple.
The first historical mention of the performance of same-sex marriages occurred during the early Roman Empire. For instance, Emperor Nero is reported to have engaged in a marriage ceremony with one of his male slaves. Emperor Elagabalus "married" a Carian slave named Hierocles. It should be noted, however, that conubium existed only between a civis Romanus and a civis Romana (that is, between a male Roman citizen and a female Roman citizen), so that a so-called marriage between two Roman males (or with a slave) would have no legal standing in Roman law (apart, presumably, from the arbitrary will of the emperor in the two aforementioned cases). Furthermore, "matrimonium is an institution involving a mother, mater. The idea implicit in the word is that a man takes a woman in marriage, in matrimonium ducere, so that he may have children by her." Still, the lack of legal validity notwithstanding, there is a consensus among modern historians that same-sex relationships existed in ancient Rome, but the exact frequency and nature of "same-sex unions" during that period is obscure. In 342 AD Christian emperors Constantius II and Constans issued a law in the Theodosian Code (C. Th. 9.7.3) prohibiting same-sex marriage in Rome and ordering execution for those so married.
A same-sex marriage between the two men Pedro Díaz and Muño Vandilaz in the Galician municipality of Rairiz de Veiga in Spain occurred on 16 April 1061. They were married by a priest at a small chapel. The historic documents about the church wedding were found at Monastery of San Salvador de Celanova.