The two rak’ahs of Fajr replace Tahiyyat al-Masjid (greeting the mosque)
A person enters the mosque before the iqaamah is called for Fajr prayer. Should he pray Tahiyyat al-Masjid (two rak’ahs to “greet the mosque”), then say the salaams, then pray the sunnah of Fajr, or should he pray the sunnah of Fajr and will that mean that he does not have to pray Tahiyyat al-Masjid?
Praise be to
Standing Committee was asked about this and they replied:
the two rak’ahs of Fajr will count for itself and for Tahiyyat al-Masjid.
This is better, but if he prays Tahiyyat al-Masjid first, then two rak’ahs
of Fajr, that is OK.
See Fataawa al-Lajnah al-Daa’imah, vol. 7, p. 244