Islam persuades us regarding friendship as we are persuaded for other interest. The details of which are present in both Quran and Hadith.
Allah سبحانه وتعالى says;
Friends on the Day will be enemies one to another, except al-Muttaqun (i.e. those who have piety).” (43:67)
It is mandatory to have friendship with those who are salihoon (the pious ones). The company of the righteous ones (صحبة الصالحين) is of the ut most importance.
Ibnul Qayyim rahimahullah said;
مجالسة الصالحين تحولك من ستة إلى ستة
1- من الشك إلى اليقين
2- ومن الرياء إلى الإخلاص
3- ومن الغفلة إلى الذكر
4- ومن الرغبة في الدنيا إلى الرغبة في الآخرة
5- ومن الكبر إلى التواضع
6- ومن سوء النية إلى النصيحة
“Sitting with righteous turns you from six to six
1- From doubt to certainty
2- From hypocrisy to sincerity
3- From negligence to remembrance
4- From the desire of this world to the desire in the hereafter
5- From arrogance to humility
6- From bad intentions to advice”.
One should learn from the Texts (نصوص) the criterion for making friends.
The Prophet (ﷺ) said:
A man follows the religion of his friend; so each one should consider whom he makes his friend.
(Sunan Abi Dawud 4833)
Among the benefits of making a good friend are;
Steadfastness on islam, to be eluded from afflictions (فتن), a person tastes the epitome of eemaan.
Among the best examples of true friendship is seen in the friendship of Muhammad صلي الله عليه وسلم and Abu Bakr radiallahu anhu, Abu Bakr and umar radiallahu anhuma etc.
To conclude I will quote some ahadith regarding the same;
Abdullah Ibn Mas’ud radiallahu anhu reported; Allah’s Messenger (صلى الله عليه وسلم) said: If I were to choose a bosom friend I would have definitely chosen Abu Bakr as my bosom friend, but he is my brother and my companion and Allah, the Exalted and Gliorious. has taken your brother and companion (meaning Prophet himself) as a friend. (sahih Muslim Book 31, Number 5871)
Abu Sa’id reported that Allah’s Messenger (ﷺ) sat on the pulpit and said:
Allah gave a choice to His servant that he may opt the beauties of the world or that which is with Him and the servant chose that which was with Him. Thereupon Abu Bakr wept and he wept bitterly and said: Let our fathers and our mothers be taken as ransom for you. It was Allah’s Messenger (ﷺ) who had been given the choice and Abu Bakr knew it better than us, and Allah’s Messenger (ﷺ) is reported to have said: Behold, of all people the most generous toward me in regard to his companionship and his property was Abu Bakr and were I to choose anyone as my bosom friend, I would have chosen Abu Bakr as my dear friend, but (for him) I cherish Islamic brotherliness and love. There shall be left open no window in the mosque except Abu Bakr’s window. (Sahih Muslim 2382).
We ask Allah to bless us with the friends who will lead us to success in the Hereafter.