Sahih al-Bukhari 477
Abū Ḥurairah (r.a) relates that the Prophet (saw) said: ‘Prayer in congregation surpasses Prayer offered alone at home or in the marketplace by twenty-five degrees. When any of you performs ablution and performs it well, and comes to the mosque with the sole intention of offering Prayer, every step he takes raises him a degree and removes a sin, until he enters the mosque. When he enters the mosque, he is considered to be in a state of Prayer as long as it keeps him there and the angels pray for him if he remains in the place that he sits. They say: “O Allāh, forgive him! O Allāh, have mercy on him”, so long as he does not harm anyone; that is, his ablution is nullified.’
Translation: Ahmadiyya Muslim Jamaat
Book 87: To offer As-Salat (the prayers) in a mosque situated in a market