They are to be treated as hired workers or temporary residents among you; they are to work for you until the Year of Jubilee.
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.
Because the Israelites are my servants, whom I brought out of Egypt, they must not be sold as slaves.
Do not rule over them ruthlessly, but fear your God.
“ ‘Your male and female slaves are to come from the nations around you; from them you may buy slaves.
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.
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.
“ ‘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,
they retain the right of redemption after they have sold themselves. One of their relatives may redeem them:
An uncle or a cousin or any blood relative in their clan may redeem them. Or if they prosper, they may redeem themselves.
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.