“And they devised a plot,” meaning: what they intended for Salih. “And they devised a plot.” Qatada said: It has been mentioned to us that while they were looking at Salih in order to assault him, Allah sent a rock upon them which crushed them.
﴿ومكروا مكرا﴾ يَعْنِي: الَّذِي أَرَادوا بِصَالح ﴿ومكروا مكرا﴾ قَالَ قَتَادَةُ: ذُكِرَ لِنَا أَنَّهُ بَيْنَا هُمْ مُعَايِنُونَ إِلَى صَالِحٍ لِيَفْتِكُوا بِهِ؛ إِذْ بَعَثَ اللَّهُ عَلَيْهِم صَخْرَة فأهمدتهم