And there were in the city nine men (from the sons of their chiefs), who made mischief in the land, and would not reform. They said: "Swear one to another by Allah that we shall make a secret night attack on him and his household, and afterwards we will surely say to his near relatives: 'We witnessed not the destruction of his household, and verily! We are telling the truth." Surah 27: 48-49
"So they plotted a plot, and We planned a plan, while they perceived not." Then see how was the end of their plot! Verily! We destroyed them and their nation, all together. These are their houses in utter ruin, for they did wrong. Verily, in this is indeed an Ayah (a lesson or a sign) for people who know. And We saved those who believed, and used to fear and obey Allah. Surah 27: 50-53
Allah saved Salih and his followers from their wicked plans. Heavy-hearted, they left the evil-doers and moved to another place.