summarised the issue as follows:
“Begging in the mosque is disliked in the sense of non-prohibitive dislike, while giving something to a beggar there is a devotional act for which one is rewarded; it is not disliked, let alone forbidden. This is what has been transmitted, and it is what the hadiths indicate.”
He then quoted al-Nawawī as saying:
“There is no harm in giving to a beggar in the mosque because of this hadith.”
Al-Suyūṭī added:
“The very hadith he cited proves both matters at once: that giving him charity is not disliked and that begging in the mosque is not unlawful, for the Messenger of Allah ﷺ learned of it through the report of al-Ṣiddīq and did not object. Had it been forbidden, he would not have approved of it; rather, he would have stopped the beggar from returning to ask in the mosque. Accordingly, any prohibition of begging in the mosque—assuming it is even authentic—must be understood as mere tanzīh-level dislike, not outright impermissibility. As for the report found in Ibn al-Ḥājj’s al-Madkhal, ‘Whoever begs in the mosques, deprive him,’ it has no foundation. We judged it only disliked by analogy with the hadith forbidding the announcement of lost property in the mosque and his ﷺ statement, ‘The mosques were not built for this.’
Another hadith also points to the permissibility of giving charity in the mosque; al-Suyūṭī overlooked it and did not cite or even allude to it in his epistle. It states:
“A man entered the mosque in shabby clothing, so the Prophet ﷺ ordered that garments be placed for him. The people put some down and he gave the man two of them. The Prophet then urged the congregation to give charity, whereupon the man returned and placed one of the two garments he had received. The Prophet cried out to him—in another version, he rebuked him—and said, ‘Take your garment.’”