40 They are to be treated as hired workers or temporary residents among you; they are to work for you until the Year of Jubilee.
41 Then they and their children are to be released, and they will go back to their own clans and to the property of their ancestors.
42 Because the Israelites are my servants, whom I brought out of Egypt, they must not be sold as slaves.
43 Do not rule over them ruthlessly, but fear your God.
44 “ ‘Your male and female slaves are to come from the nations around you; from them you may buy slaves.
45 You may also buy some of the temporary residents living among you and members of their clans born in your country, and they will become your property.
46 You can bequeath them to your children as inherited property and can make them slaves for life, but you must not rule over your fellow Israelites ruthlessly.
47 “ ‘If a foreigner residing among you becomes rich and any of your fellow Israelites become poor and sell themselves to the foreigner or to a member of the foreigner’s clan,
48 they retain the right of redemption after they have sold themselves. One of their relatives may redeem them:
49 An uncle or a cousin or any blood relative in their clan may redeem them. Or if they prosper, they may redeem themselves.
50 They and their buyer are to count the time from the year they sold themselves up to the Year of Jubilee. The price for their release is to be based on the rate paid to a hired worker for that number of years.