Slavery in medieval Europe was widespread. Europe and North Africa were part of an interconnected trade network across the Mediterranean Sea, and this included slave trading. During the medieval period (500–1500), wartime captives were commonly forced into slavery. As European kingdoms transitioned to feudal societies, a different legal category of unfree persons – serfdom –began to replace slavery as the main economic and agricultural engine. Throughout medieval Europe, the perspectives and societal roles of enslaved peoples differed greatly, from some being restricted to agricultural labor to others being positioned as trusted political advisors.