How Are We to Understand Slavery In Both The Old and New Testaments?

The stark, harsh image that comes to mind when we think of slavery is that of the dark, sweaty bodies of slaves bent over rowing ships as the boss man beat them with whips. What about the Bible?