Leviticus 25:39-55 Revised Standard Version (RSV)
39 “And if your brother becomes poor beside you, and sells himself to you, you shall not make him serve as a slave: 40 he shall be with you as a hired servant and as a sojourner. He shall serve with you until the year of the jubilee; 41 then he shall go out from you, he and his children with him, and go back to his own family, and return to the possession of his fathers. 42 For they are my servants, whom I brought forth out of the land of Egypt; they shall not be sold as slaves. 43 You shall not rule over him with harshness, but shall fear your God. 44 As for your male and female slaves whom you may have: you may buy male and female slaves from among the nations that are round about you. 45 You may also buy from among the strangers who sojourn with you and their families that are with you, who have been born in your land; and they may be your property. 46 You may bequeath them to your sons after you, to inherit as a possession for ever; you may make slaves of them, but over your brethren the people of Israel you shall not rule, one over another, with harshness.
47 “If a stranger or sojourner with you becomes rich, and your brother beside him becomes poor and sells himself to the stranger or sojourner with you, or to a member of the stranger’s family, 48 then after he is sold he may be redeemed; one of his brothers may redeem him, 49 or his uncle, or his cousin may redeem him, or a near kinsman belonging to his family may redeem him; or if he grows rich he may redeem himself. 50 He shall reckon with him who bought him from the year when he sold himself to him until the year of jubilee, and the price of his release shall be according to the number of years; the time he was with his owner shall be rated as the time of a hired servant. 51 If there are still many years, according to them he shall refund out of the price paid for him the price for his redemption. 52 If there remain but a few years until the year of jubilee, he shall make a reckoning with him; according to the years of service due from him he shall refund the money for his redemption. 53 As a servant hired year by year shall he be with him; he shall not rule with harshness over him in your sight. 54 And if he is not redeemed by these means, then he shall be released in the year of jubilee, he and his children with him. 55 For to me the people of Israel are servants, they are my servants whom I brought forth out of the land of Egypt: I am the Lord your God.