ثُمَّ نُكِسُوا۟ عَلَىٰ رُءُوسِهِمْ لَقَدْ عَلِمْتَ مَا هَـٰٓؤُلَآءِ يَنطِقُونَ Qur’an Al-Anbiya (21:65)Thumma nukisoo AAal a ruoosihim laqad AAalimta m a h a ol a i yan t iqoon a
Lit., "they were turned upside down upon their heads": an idiomatic phrase denoting a "mental somersault" - in this case, a sudden reversal of their readiness to exonerate Abraham and a return to their former suspicion.
Literally, "they were turned down on their heads" which may suggest a metaphorical somersault, i.e., they recovered from their dawning shame for idolatry and were prepared to argue it out with the youth Abraham. But I think there is better authority for the interpretation I have adopted.