Slavery ended as an institution in the West with the collapse of the Roman Empire, but was revived a thousand years later because of the immense profits that could be made from sugar. The middle-east and later islamic world never abandoned the practice and it exists to the present day.
Actually there was slavery in the medieval West, although serfdom was more prevalent. It was not considered OK to enslave a fellow Catholic, but it was OK to enslave a pagan, a Muslim, or in some cases a “schismatic” (Orthodox Christian). When the Portuguese began to explore the coast of Africa, they considered it fine to enslave white “pagans” in the Canary Islands, and later black “pagans” further south on the African mainland.