Leviticus 25:23-34 ESV
“The land shall not be sold in perpetuity, for the land is mine. For you are strangers and sojourners with me. And in all the country you possess, you shall allow a redemption of the land.
“If your brother becomes poor and sells part of his property, then his nearest redeemer shall come and redeem what his brother has sold. If a man has no one to redeem it and then himself becomes prosperous and finds sufficient means to redeem it, let him calculate the years since he sold it and pay back the balance to the man to whom he sold it, and then return to his property. But if he does not have sufficient means to recover it, then what he sold shall remain in the hand of the buyer until the year of jubilee. In the jubilee it shall be released, and he shall return to his property.
“If a man sells a dwelling house in a walled city, he may redeem it within a year of its sale. For a full year he shall have the right of redemption. If it is not redeemed within a full year, then the house in the walled city shall belong in perpetuity to the buyer, throughout his generations; it shall not be released in the jubilee. But the houses of the villages that have no wall around them shall be classified with the fields of the land. They may be redeemed, and they shall be released in the jubilee. As for the cities of the Levites, the Levites may redeem at any time the houses in the cities they possess. And if one of the Levites exercises his right of redemption, then the house that was sold in a city they possess shall be released in the jubilee. For the houses in the cities of the Levites are their possession among the people of Israel. But the fields of pastureland belonging to their cities may not be sold, for that is their possession forever.
ESV: English Standard Version 2016