Abu Hurairah reported the Messenger of Allah as saying:
Prayer said by a man in congregation is twenty five degrees more excellent than prayer said by him alone in his house or in the market.
This is because when any of you performs ablution and does it perfectly,
and goes out to the mosque having no intention except praying,
and nothing moves him except prayer,
then at every step which he takes, his rank is elevated by one degree on account of this (walking),
and one sin is remitted from him for this (walking),
till he enters the mosque.
When he enters the mosque,
he will be reckoned as praying as long as he will be detained by the prayer.
The angels keep on invoking blessing on any of you so long as he remains seated in the place he prayer, saying:
O Allah! forgive him
O Allah! have mercy on him
O Allah! accept his repentance’
so long as he does not harm anyone, or breaks his ablution.”
Sunan Abu-awud: Book 2, Hadith 169