Leviticus 25:35-55

Poor Israelites and slavery

35 If one of your fellow Israelites faces financial difficulty and is in a shaky situation with you, you must assist them as you would an immigrant or foreign guest so that they can survive among you.
36 Do not take interest from them, or any kind of profit from interest, but fear your God so that your fellow Israelite can survive among you.
37 Do not lend a poor Israelite money with interest or lend food at a profit.
38 I am the LORD your God, who brought you out from the land of Egypt to give you Canaan's land and to be your God.
39 If one of your fellow Israelites faces financial difficulty with you and sells themselves to you, you must not make him work as a slave.
40 Instead, they will be like a hired laborer or foreign guest to you. They will work for you until the Jubilee year,
41 at which point the poor Israelite along with their children will be released from you. They can return to their extended family and to their family property.
42 You must do this because these people are my servants—I brought them out of Egypt's land. They must not be sold as slaves.
43 You will not harshly rule over them but must fear your God.
44 Regarding male or female slaves that you are allowed to have: You can buy a male or a female slave from the nations that are around you.
45 You can also buy them from the foreign guests who live with you and from their extended families that are with you, who were born in your land. These can belong to you as property.
46 You can pass them on to your children as inheritance that they can own as permanent property. You can make these people work as slaves, but you must not rule harshly over your own people, the Israelites.
47 If an immigrant or foreign guest prospers financially among you, but your fellow Israelite faces financial difficulty and so sells themselves to the immigrant or foreign guest, or to a descendant of a foreigner,
48 the Israelite will have the right to be bought back after they sold themselves. One of their relatives can buy them back:
49 their uncle or cousin can buy them back; one of their blood relatives from their family can buy them back; or they may be able to afford their own purchase.
50 The Israelite will calculate with their owner the time from the year they were sold until the Jubilee year. The price of their release will be based on the number of years they were with the owner, as in the case of a hired laborer.
51 If there are many years left before the Jubilee, the Israelite will pay for their purchase in proportion to their purchase price.
52 If only a few years are left, they will calculate that and pay for their purchase according to the years of service.
53 Regardless, the Israelite will be to the buyer like a yearly laborer; the buyer must not harshly rule over them in your sight.
54 If the Israelite is not bought back in one of these ways, they and their children must be released in the Jubilee year
55 because the Israelites belong to me as servants. They are my servants—I brought them out of Egypt's land; I am the LORD your God.