Ibn Abi Haatim mention in his book “Manaaqibus Shaafiee” and Al Bayhaaqi in his book “Manaaqibus Shafiee” that Ash Shafiee and Muhammad Ibn Hassan differed in regards to which of the two scholars is more knowledgeable, Maalik or Abu Haneefah.  Ash Shafiee liked Maalik and Shafiee was a student of Maalik while Muhammad Ibn Hassan was a student of Abu Haneefah.

So Imam As Shafiee said to Muhammad Ibn Hassan, “I ask you by Allah, is our companion more knowledgeable with the book of Allah or your companion?” So he (Muhammad) said, “Your companion” (meaning Malik). So he (Ash Shafiee) said, I ask you by Allah, is our companion more knowledgeable with the Sunnah or your companion?” So he (Muhammad) said, “Your companion” (meaning Malik). So he (Ash Shafiee) said, “Nothing remains except analogy and the one who doesn’t have foundations, then upon what will he make analogy?”

Ibn Abi Haatim and Al Bayhaaqi mentioned this story with an authentic chain.

Mentioned by

Majid Jawed Al-Afghanee
Abu Layl