Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:21:70

And they intended for him harm, but We made them the greatest losers.  

And they sought to outwit him, namely, by having him burnt, but We made them the greater losers, in what they sought.
القرآن:٢١:٧٠

وَأَرَادُوا بِهِ كَيْدًا فَجَعَلْنَاهُمُ الْأَخْسَرِينَ  

{وأرادوا به كيداً} وهو التحريق {فجعلناهم الأخسرين} في مرادهم.

See similar narrations below:

Collected by Qurʾān
quran:37:98

And they intended for him a plan, but We made them the most debased.  

So they sought to outwit him, by flinging him into the fire, so that it may destroy him, but We made them the lowermost, the vanquished, as he came out of the fire unharmed.
القرآن:٣٧:٩٨

فَأَرَادُوا بِهِ كَيْدًا فَجَعَلْنَاهُمُ الْأَسْفَلِينَ  

{فأرادوا به كيدا} بإلقائه في النار لتهلكه {فجعلناهم الأسفلين} المقهورين فخرج من النار سالما.