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.
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.
Do not lend a poor Israelite money with interest or lend food at a profit.
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.
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.
Instead, they will be like a hired laborer or foreign guest to you. They will work for you until the Jubilee year,
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.
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.
You will not harshly rule over them but must fear your God.
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.
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.
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.
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,
the Israelite will have the right to be bought back after they sold themselves. One of their relatives can buy them back:
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.
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.
If there are many years left before the Jubilee, the Israelite will pay for their purchase in proportion to their purchase price.
If only a few years are left, they will calculate that and pay for their purchase according to the years of service.
Regardless, the Israelite will be to the buyer like a yearly laborer; the buyer must not harshly rule over them in your sight.
If the Israelite is not bought back in one of these ways, they and their children must be released in the Jubilee year
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.