Ata' (may Allah have mercy on him) narrated that Sayyiduna Qays bin Sahl al-Ansari (may Allah be pleased with him) related that he entered the mosque while the Prophet (peace and blessings be upon him) was leading the prayer, and he had not prayed the two rak'ahs (of Fajr). So he prayed with the Prophet (peace and blessings be upon him), and when he had completed his prayer he stood and prayed the two rak'ahs of Fajr. The Prophet (peace and blessings be upon him) saw him and said: "O Qays, what are these two?" He told him (peace and blessings be upon him) what he had done, and the Prophet (peace and blessings be upon him) did not object to it.
Hadith Referenceالمعجم الكبير للطبراني / باب القاف / 16029