Sayyiduna Abu Musa (may Allah be pleased with him) narrated: The prayer had begun when Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) approached the mosque, so he first prayed two rak'ahs, then entered the mosque.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9355