Deuteronomy 30:2-3

30:2 Then if you and your descendants turn to the Lord your God and obey him with your whole mind and being just as I am commanding you today, 30:3 the Lord your God will reverse your captivity and have pity on you. He will turn and gather you from all the peoples among whom he has scattered you.