In the Dahomey Empire
The giving of virgin girls to the gods was part of many ancient religions. In West Africa the practice has gone on for at least several hundred years. Similar practices using similar terminology were found in the royal court of the Kingdom of Dahomey (in what is now Benin), in the 1700s and 1800's. Wives, slaves, and in fact all persons connected with the royal palace of Dahomey were called "ahosi", from "aho" meaning "king", and "si" meaning "dependent" or "subordinate." By one estimate there were 5,000 to 7,000 ahosi living in the palace at Abomey, and no men lived there except for a few hundred eunuchs were charged with controlling the women. After sunset no men at all were allowed in the palace except the king, and he was guarded by women guards called Amazons. The king controlled every aspect of the lives and even the deaths of the ahosi. Visitors to old Abomey today are shown a mass grave and told that the king's wives "volunteered," on his death, to be buried alive with him in order to accompany him and serve him in the world to come. One researcher pointed out, "Of course, one should not make the mistake of ascribing modern democratic meaning to the word "volunteered" as if the wives wanted to die or had any choice in the matter. Ahosi who became too powerful or too independently-minded were simply sacrificed (literally and physically) in the annual office ceremony lasting several days in which the power of the king was renewed by hundreds of human sacrifices, usually performed by public beheadings.
The practice was documented by A.B. Ellis who was an eyewitness of the practice in the Dahomey Empire (now Benin) in 1895. According to Ellis, one god called "Khebioso" had 1500 wives in Dahomey alone, the women being called "kosio". He said they cared for the shrines of the gods, but their main business was religious prostitution. According to Ellis, most of the gods of the Ewe-speaking people at that time had such women who were similarly consecrated to their service and were commonly considered "wives" of the gods.
One might argue that those ahosi were wives of the king and lived in the palace, not wives of the gods living in the shrines. But that distinction is not as clearcut as it might first seem, for the palace was the center of Dahomean religious life, and the place where sacrifices were made and rituals to the ancestors were performed. Over time, then, it was an easy jump from being ahosi living lives totally controlled by the king in the palace where sacrifices were offered and rituals were performed, to being trokosi living lives totally controlled by a priest in a shrine where sacrifices were offered and rituals were performed. It was a very easy transition indeed. Even in the time of the Kingdom of Dahomey, one reads of the vodun or gods successfully demanding that someone become a devotee or vodunsi (wife or follower of the god).
 In Ghana
As people migrated within West Africa, the practice spread. Sandra Greene has noted that in Ghana, the practice dates to at least the late eighteenth century. At the time the Amlade clan Sui became very powerful, and began to demand female slaves from those who sought its services. The practice called "replacement" also began in Ghana at that time. Under this practice, if a shrine slave died or ran away, the family was required to replace her with another girl. At the beginning of the nineteenth century, Nyigbla became the chief Anlo deity, and its shrines also began to demand slaves for its services. Involuntary slavery, however, was not at that time and in that place common, since Nyigbla also instituted a practice called foasi, whereby two servants were recruited annually on a more-or-less voluntary basis. At that time, the slaves were often married to members of powerful priestly families.
 History of Opposition to the Practice
 In Colonial Times
It is reported by traditionalists that since the mid-eighteenth century the Bremen missionaries decried the practice and purchased freedom for individual trokosi, which were then called "new made slaves," converting them to Christianity.
When Ghana (then Gold Coast) was under colonial rule, a few citizens complained about the practice, but the colonial masters turned their heads. They derided him as "the blind man who wants to help others see." The colonial government did investigate the practice at Atigo shrine near Battor from 1919 to 1924. The investigating District Commissioner, W. Price Jones, called it "a pernicious habit of handing girls over to the fetish," but for economic reasons, decided not to interfere. As a result of that inquiry, shrine slaves held at the Atigo shrine were told they could return home if they wished. Soon after, the colonial government ignored another complaint that the shrine was still keeping trokosi. After that, the practice slid back into secrecy and was not brought to the public consciousness again until 1980.
 In the 1980's
The practice was drawn into the national spotlight at that time when Mark Wisdom, a Baptist pastor, responded to what he claims was a vision from God, and challenged the system in the national media. Wisdom claimed that as he prayed, he saw a vision of women in bonds, crying out for help. Wisdom claimed to have later discovered these same women on one of his evangelistic missions, held in bondage in a shrine just across the Volta River from his home, but previously unknown to him. He began publicly denouncing the practice, so much so that headlines in Ghana screamed that he was not afraid of the shrine priests. Wisdom wrote a book on the subject, founded FESLIM (Fetish Slaves Liberation Movement), and was instrumental in some of the earliest liberations, but it was his bold public statements reported in the news that pricked the national conscious