47If a foreigner residing among you prospers, but your countryman dwelling near him becomes destitute and sells himself to the foreigner or to a member of his clan,
48he retains the right of redemption after he has sold himself. One of his brothers may redeem him:
49either his uncle or cousin or any close relative from his clan may redeem him. Or if he prospers, he may redeem himself.
— Leviticus 25:47-49