Abu Huraira reported God’s Messenger as saying, “When you pass one of the gardens of paradise, feed there.” When asked what the gardens of paradise were he replied that they were the mosques, and when asked what the feeding consisted of, he replied, “Glory be to God; Praise be to God; there is no god but God; and God is most great.”
Fatima daughter of al-Husain said on the authority of her grand-mother, Fatima the elder,* that when the Prophet entered the mosque he would pray for blessings and safety for himself and say, “My Lord, forgive me my sins, and open to me the gates of Thy mercy.” And when he went out he would pray for blessings and safety for himself and say, “My Lord, forgive me my sins, and open to me the gates of Thy abundance.”
*The daughter of the Prophet who married ‘Ali.
Tirmidhi, Ahmad and Ibn Majah transmitted it. In the version of the last two she said that when he entered the mosque, and also when he came out, he said, “In the name of God, and peace be upon God’s Messenger,” instead of “he would pray for blessings and safety for himself.” Tirmidhi said that its isnad is not connected, for Fatima daughter of al-Husain was not born in the lifetime of Fatima the elder.
He also reported God’s Messenger as saying, “If one goes out from his house to a stated prayer in a state of purity, his reward will be like that of the pilgrim in the sacred state; if one goes out to devotions in the forenoon, nothing else causing him to go out, his reward will be like that of him who performs the ‘umra;1 and a prayer following another with no idle talk between them will be a deed recorded in llliyun,”2
1. The little pilgrimage, consisting of the rites at the Ka'ba and the running between al-Safa and al-Marwa.
2. See Al-Qur’an, 83:18 ff.