أَخْبَرَنَا أَبُو مُحَمَّدِ بْنُ يُوسُفَ الْأَصْبَهَانِيُّ ، حَدَّثَنَا أَبُو الْحَسَنِ عَلِيُّ بْنُ مُحَمَّدِ بْنِ عُقْبَةَ الشَّيْبَانِيُّ ، بِالْكُوفَةِ ، حَدَّثَنَا الْحُسَيْنُ بْنُ الْحَكَمِ ، حَدَّثَنَا أَبُو حَفْصٍ الْأَعْشَى ، حَدَّثَنَا سُفْيَانُ الثَّوْرِيُّ قَالَ : دَخَلْتُ عَلَى جَعْفَرِ بْنِ مُحَمَّدٍ وَهُوَ فِي مَسْجِدِهِ فَقَالَ : " مَا جَاءَ بِكَ يَا سُفْيَانُ ؟ قَالَ : قُلْتُ : طَلَبُ الْعِلْمِ . قَالَ : فَقَالَ : يَا سُفْيَانُ إِذَا ظَهَرَتْ عَلَيْكَ نِعْمَةٌ فَاتَّقِ اللَّهَ وَإِذَا أَبْطَأَ عَنْكَ الرِّزْقُ فَاسْتَغْفِرِ اللَّهَ وَإِذَا دَهَمَكَ أَمْرٌ مِنَ الْأُمُورِ فَقُلْ : لَا حَوْلَ وَلَا قُوَّةَ إِلَّا بِاللَّهِ ، ثُمَّ قَالَ : يَا سُفْيَانُ ثَلَاثًا وَأَيُّمَا ثَلَاثٍ " .
Imam Sufyan al-Thawri (may Allah have mercy on him) narrates that I went to Imam Ja'far bin Muhammad (may Allah have mercy on him) while he was in his mosque, and he said: "O Sufyan, what has brought you here?" I said: "Seeking knowledge." He said: "O Sufyan, when a blessing appears upon you, fear Allah; when your provision is slow in coming, seek forgiveness from Allah; and when some matter suddenly befalls you, say: 'There is no power to avoid sin and no strength to do good except through Allah.'" Then he said: "O Sufyan, these are three things, and what (great) three things they are!"