Is performing righteous deeds and avoiding following Satan from the mercy of Allah?
Answer:
Allah the Exalted says:
«وَإِذَا جَاءَهُمْ أَمْرٌ مِّنَ الْأَمْنِ أَوِ الْخَوْفِ أَذَاعُوا بِهِ ۖ وَلَوْ رَدُّوهُ إِلَى الرَّسُولِ وَإِلَىٰ أُولِي الْأَمْرِ مِنْهُمْ لَعَلِمَهُ الَّذِينَ يَسْتَنبِطُونَهُ مِنْهُمْ ۗ وَلَوْلَا فَضْلُ اللَّهِ عَلَيْكُمْ وَرَحْمَتُهُ لَاتَّبَعْتُمُ الشَّيْطَانَ إِلَّا قَلِيلً»
“And when a matter of security or fear comes to them, they spread it about. And if they had referred it to the Messenger and to those in authority among them, then those of them who can draw out its true meaning would have known it. And were it not for the grace of Allah upon you and His mercy, you would have followed Satan, except for a few.”
In this noble verse there is a refutation of the one who hastens to deal with matters before they are established, so he reports them and spreads them, and it is also possible that those matters are not correct at all.
The meaning of «يَسْتَنبِطُونَهُ» is that they extract it and employ it in its proper place.
The answer to this question is in the last part of the noble verse: that were it not for the mercy and grace of Allah upon you, you would have followed Satan.