Deuteronomy 30:2-4

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. 30:4 Even if your exiles are in the most distant land, from there the Lord your God will gather you and bring you back.