In the early Middle Ages European Christians felt that it was perfectly OK to enslave anyone who was a pagan--the term "slave" comes from the ethnic term Slav because so many pagan Slavs were enslaved. Later in the Middle Ages it was OK to enslave Muslims or people with the wrong version of Christianity--or pagans. That was the justification for enslaving black Africans--the fact that they were not Christians.
"Technically" is not the right word here, since slavery can take many different forms, both legally and de facto.
For example, indentured servitude was usually a relatively benign form practiced extensively until outlawed in the early 1800s.
Young people were "sold", or sold themselves, into a temporary slavery, i.e., for five years, in order to pay off a debt such as transportation and lodging in North America.
Another example: two hundred years ago prisoners were treated as slaves for the duration of their sentences, etc.
So Stalin's Gulag and Hitler's concentration camps were essentially slave labor facilities often intended to work their prisoners to death.
And we might argue the fine point of whether, legally, European serfs & Asian "coolies" were slaves, but clearly some effectively were, if not all.
Verginius Rufus: "Later in the Middle Ages it was OK to enslave Muslims or people with the wrong version of Christianity--or pagans.
That was the justification for enslaving black Africans--the fact that they were not Christians."
Right, and it sounds like you recognize that the Bible strongly opposes slavery for God's people, which we take to mean Christians.
So, if a slave became a Christian then his Christian "master" was morally obliged to free him, if not immediately, then in due time.