Surah Hud Verse 117 - English Translation by Shabbir Ahmed
Surah Hudوَمَا كَانَ رَبُّكَ لِيُهۡلِكَ ٱلۡقُرَىٰ بِظُلۡمٖ وَأَهۡلُهَا مُصۡلِحُونَ
For, your Lord would never annihilate a community for wrong beliefs alone as long as its people behave righteously towards one another. (The Qur'an is consistent in its theme that people will be rewarded according to what they do YA'AMALOON, and not what they know YA'ALAMOON. The reason that the Book stresses so much on the right belief system, is that humans are strongly influenced in their behavior by what they think and believe)