Deuteronomy 4:29-31 NIV
But if from there you seek the LORD your God, you will find him if you seek him with all your heart and with all your soul. When you are in distress and all these things have happened to you, then in later days you will return to the LORD your God and obey him. For the LORD your God is a merciful God; he will not abandon or destroy you or forget the covenant with your ancestors, which he confirmed to them by oath.
NIV: New International Version