associates someone else with Me, I abandon him and his act of shirk.’
The scholars classify this narration as a hadith qudsi—that is, a report the Prophet ﷺ relates from his Lord, introducing it with the words, “Allah the Exalted says….” Every report transmitted from the Messenger ﷺ is either attributed by him to Allah, in which case it is called a hadith qudsi, or it is not so attributed, in which case it is simply a prophetic hadith.
In this hadith qudsi Allah says, ‘I am the One most free of need for partners.’ All partners in worldly dealings are needy: each depends on the other, clings to his own share, and will not forgo it. Imagine a house owned by two people, each reliant on the other. Should the house suffer damage and require repairs, each partner will insist, “Contribute your portion so we can rebuild,” and each will hold fast to his share.
Allah, exalted is He, is rich beyond all need; He is independent of the whole universe. Accordingly, if a person performs a deed intending both Allah and someone else, Allah leaves him to that partner. Should someone pray for Allah’s sake and for people’s admiration, Allah will not accept that prayer. One cannot say He accepts half of it, or accepts it partially—He does not accept it at all. Likewise, a charitable donation given to impress people is not accepted, because Allah is the One most free of need for partners. Whenever a deed is offered in which a person associates another with Allah, Allah rejects it.
This demonstrates that if ostentation (riya’) infiltrates an act of worship, that act is void. If someone begins the prayer solely to be seen—so that people will remark, “What a devoted man; he prays so often!”—he earns no share of that prayer, and Allah will not accept it, even if he lengthens its bowing, prostration, standing, and sitting.