And if the people of the towns had believed and guarded ( against evil ) We would certainly have opened up for them blessings from the heaven and the earth , but they rejected , so We overtook them for what they had earned .