Islam treats Hadith About Friendship as a matter of faith, not just comfort. The Prophet ﷺ taught that “a man follows the religion of his friend” (Sunan Abi Dawud 4833, graded Hasan), meaning your closest companions shape your beliefs and habits over time. He also compared good and bad friends to a musk seller and a blacksmith one leaves you better, the other leaves you burned (Sahih al-Bukhari 2101). Choosing friends wisely is, in Islam, a form of protecting your own soul.
Why Friendship Matters So Much in Islam

You don’t choose your family. You do choose your friends. That’s exactly why Islam takes friendship so seriously it’s one of the few relationships you have full control over, and it shapes your deen (your faith and practice) more than almost anything else.
The Quran and hadith don’t treat friendship as a side topic. They treat it as a spiritual decision with consequences that follow you into the Hereafter. Your friends influence what you normalize, what you laugh at, what you feel guilty about, and what you stop feeling guilty about. Islam calls this influence real, and it asks you to take it seriously. This ties into the wider social fabric of faith our guide to the Benefits of Islam covers how community and companionship function as one of the faith’s core sources of support.
This isn’t about being suspicious of people. It’s about being intentional the same way you’d be intentional about what you eat or where you invest your money.
The Core Hadith “A Man Follows the Religion of His Friend”
Definition: This hadith is the foundational Islamic teaching on friendship. It states that a person’s character and faith tend to mirror the company they keep, so choosing a friend is, in effect, choosing an influence on your religion.
Abu Hurairah reported that the Prophet ﷺ said a person tends to take on the faith and character of whoever they’re closest to which is why he instructed each of us to be deliberate about who we befriend.
| Detail | Information |
| Hadith | A man follows the religion (or way) of his close friend |
| Source | Sunan Abi Dawud 4833 |
| Narrator | Abu Hurairah |
| Grading | Hasan (graded by Al-Albani) |
| Meaning | Your closest friendships shape your beliefs and behavior over time |
This isn’t a claim that every friend controls your fate. It’s a warning about slow, quiet influence the kind you don’t notice until years later.
What Does the Quran Say About Friendship?

The Quran adds a dimension hadith alone doesn’t fully capture: the idea that friendship has an expiration date unless it’s built on the right foundation.
Surah Az-Zukhruf (43:67) states that on the Day of Judgment, close friends will turn into enemies of one another with one exception: those who were friends out of taqwa (God-consciousness). In other words, friendships built purely on shared interests, convenience, or worldly benefit don’t survive death. Friendships rooted in shared faith and mutual accountability do.
Surah At-Tawbah (9:71) describes believing men and women as allies and protectors of one another supporting each other in doing what’s right and discouraging what’s wrong. This verse frames healthy friendship not as passive companionship, but as an active partnership in becoming better people.
| Angle | Hadith emphasis | Quran emphasis |
| Focus | Personal influence and character | Long-term spiritual consequence |
| Timeframe | This life | This life and the Hereafter |
| Core idea | Who you’re close to shapes who you become | Friendship without faith doesn’t last past death |
Together, they answer the same question from two directions: hadith explains how friendship shapes you; the Quran explains why it matters eternally.
The Hadith of the Musk Seller and the Blacksmith’s Bellows
This is one of the most quoted hadith on friendship and one of the most practical.
The Prophet ﷺ compared a good companion to someone selling musk: even if you don’t buy anything, you walk away carrying a pleasant scent. A bad companion, he said, is like someone working a blacksmith’s bellows: even without direct harm, you risk your clothes catching a spark, or at minimum, walking away smelling of smoke. (Sahih al-Bukhari 2101, Sahih Muslim)
Self-contained answer: Good friends leave you better simply through proximity their habits, values, and reminders rub off on you. Bad friends carry the same risk in reverse: even if they never directly pressure you into anything, being around them increases your exposure to harm. The hadith teaches that influence happens passively, not just through direct persuasion.
This is the hadith to remember when you’re evaluating a friendship that feels neutral neither clearly good nor clearly bad. Ask: after time with this person, do I generally walk away closer to who I want to be, or further from it?
Hadith Table 6 Authentic Sayings on Friendship at a Glance
| Hadith (paraphrased) | Source | Grading | One-line meaning |
| A person follows the way of their close friend | Sunan Abi Dawud 4833 | Hasan | Friends shape your faith and character |
| Good and bad company are like a musk seller and a blacksmith | Sahih al-Bukhari 2101 | Sahih | Influence happens even without direct persuasion |
| Believers are guardians of one another, enjoining good | Quran 9:71 | (Quranic verse) | Real friendship actively supports faith and good conduct |
| Friends will be enemies on Judgment Day, except the God-conscious | Quran 43:67 | (Quranic verse) | Only faith-based friendship survives death |
| Two who love each other for Allah’s sake will be shaded by His Throne | Sahih al-Bukhari & Sahih Muslim (Riyad as-Salihin 658) | Sahih | Friendship rooted in love of Allah carries eternal reward |
| A believer is the mirror of his brother | Sunan Abi Dawud (Hasan, per multiple scholars) | Hasan | True friends reflect your faults back to you honestly |
Friends on the Day of Judgment
Two teachings work together here, and most articles cover them separately but they’re really one lesson in two parts.
First, the Quran’s warning in 43:67: friendships built on anything other than shared faith and God-consciousness will not survive into the next life. They’ll dissolve, or worse, turn hostile, once worldly motives no longer matter.
Second, the flip side the hadith describing seven types of people Allah will shade on a day when there is no other shade, which includes “two men who love and meet each other and depart from each other for the sake of Allah” (Sahih al-Bukhari and Sahih Muslim).
Read together, the message is direct: friendship for the sake of Allah is one of the few relationships explicitly promised protection and reward on the hardest day. Friendship for any other sake alone is not. This same theme sincerity and mercy as the heart of worship runs through our piece on the Beauty of Islam.
Is It Haram to Be Friends With Non-Muslims?
Direct answer: No Islam does not prohibit friendliness, kindness, or social relationships with non-Muslims. What the tradition cautions against is taking someone as a close, trusted confidant whose values actively pull you away from your faith, regardless of their religion.
The Prophet ﷺ himself interacted warmly with people of other faiths throughout his life, including visiting a sick non-Muslim neighbor. The Quran (49:13) explicitly frames human diversity different peoples and tribes as something to be understood, not avoided, with righteousness (not religion alone) as the true measure of a person’s standing. For a broader look at how Islam defines what’s permitted and discouraged in everyday interactions, see our guide to What Is Halal and Haram in Islam?
The distinction scholars draw is between general kindness and social friendliness (encouraged with everyone) and intimate companionship that shapes your character (where shared values matter most). You can be a good neighbor, colleague, or classmate to anyone. Your closest circle the people whose habits you’re absorbing is where the “religion of your friend” hadith applies most directly.
How to Choose Good Friends A Practical Checklist

Here’s a simple framework call it the 3-Question Friend Filter drawn directly from the hadith above, that you can apply to any friendship, old or new:
- Does this person’s company make me want to do good, or does it make bad choices feel normal? (Based on the musk seller/blacksmith hadith influence is often passive, not obvious.)
- Would this friendship still make sense if neither of us benefited from it materially? (Based on Quran 43:67 friendships built purely on convenience or benefit tend to be temporary.)
- Does this person tell me the truth, even when it’s uncomfortable? (Based on the “mirror” hadith real friends reflect your faults so you can grow, not just validate you.)
If a friendship consistently fails all three, it’s worth stepping back not necessarily cutting the person off entirely, but being honest about how much influence you’re giving them. The same principle of sincere intention over surface-level connection shows up in our guide to Islamic Relationship Rules, which applies a similar filter to romantic relationships.
Applying This in Modern Life
These hadith were taught in a 7th-century Arabian context, but the underlying mechanism social proximity shaping behavior hasn’t changed. It’s just moved platforms.
Today, “friendship” also includes who you follow and engage with online, group chats you’re in daily, and coworkers you spend more waking hours with than family. The musk seller and blacksmith principle applies just as much to a group chat’s tone as it does to an in-person friend group. Moving cities, starting college, or changing jobs are also modern versions of the same test the early Muslims faced: rebuilding a righteous circle from scratch, without defaulting to whoever happens to be nearby. If you’re rebuilding your own circle around faith, our Start Your Journey page is a good place to find that footing.
FAQs
What is the most well-known hadith about friendship?
The hadith stating that a person follows the religion of their close friend (Sunan Abi Dawud 4833) is the most widely cited, along with the musk seller and blacksmith’s bellows parable from Sahih al-Bukhari.
What does the Quran say about friendship?
The Quran teaches that friendships not built on shared faith and God-consciousness will not last into the Hereafter (43:67), and that true believers support and protect one another in doing good (9:71).
Is it a sin to have bad friends in Islam?
Having a bad friend isn’t itself a sin, but knowingly staying in a friendship that consistently pulls you toward wrongdoing goes against the guidance in these hadith and verses, which call for intentional, values-based friendship choices.
What are the qualities of a good friend according to Islam?
Based on these teachings, a good friend encourages faith and good character, tells you the truth even when it’s uncomfortable, and leaves you better simply through their company similar to the musk-seller comparison.
Can Muslims be friends with non-Muslims?
Yes. Islam encourages kindness and good relations with people of all faiths; the caution is specifically about close companionship that compromises your values, not friendliness in general.