Leviticus 25:23-34

Buying back family property

23 The land must not be permanently sold because the land is mine. You are just immigrants and foreign guests of mine.
24 Throughout the whole land that you possess, you must allow for the land to be bought back.
25 When one of your fellow Israelites faces financial difficulty and must sell part of their family property, the closest relative will come and buy back what their fellow Israelite has sold.
26 If the person doesn't have someone to buy it back, but then manages to afford buying it back,
27 they must calculate the years since its sale and refund the balance to the person to whom they sold it. Then it will go back to the family property.
28 If they cannot afford to make a refund to the buyer, whatever was sold will remain in the possession of the buyer until the Jubilee year. It will be released in the Jubilee year, at which point it will return to the family property.
29 When a person sells a home in a walled city, it may be bought back until a year after its sale. The period for buying it back will be one year.
30 If it is not bought back before a full year has passed, the house in the walled city will belong to the buyer permanently and their descendants forever. It will not be released at the Jubilee.
31 But houses in settlements that are unwalled will be considered as if they were country fields. They can be bought back, and they must be released at the Jubilee.
32 Levites will always have the right to buy back homes in the levitical cities that are part of their family property.
33 Levite property that can be bought back—houses sold in a city that is their family property—must be released at the Jubilee, because homes in levitical cities are the Levites' family property among the Israelites.
34 But the pastureland around their cities cannot be sold, because that is their permanent family property.