Offering Salah while wearing shoes

Q: There is a difference of opinion over entering the Masjids (mosques) while wearing shoes and praying with them on. What is the Islamic ruling on this?

A: The Prophet (peace be upon him) not only used to enter the Masjid while wearing his shoes but he also offered Salah while wearing them. Abu Dawud narrated in his Sunan (Hadith compilations classified by jurisprudential themes) on the authority of Abu Sa`id Al-Khudry who said: When the Prophet (peace be upon him) was leading his Companions in prayer, he took off his shoes and put them to his left. When people saw this, all of them took off their shoes. When the Prophet (peace be upon him) finished the prayer, he asked them, "What made you take off your shoes?" They said, "We saw you taking off your shoes, so we took off ours, too." The Prophet (peace be upon him) said, "Jibril (Gabriel) came to me and told me that there was something dirty on them. When any one of you comes to the Masjid (mosque), let him look and if he sees anything dirty on his shoes, let him wipe them and then pray in them." In another narration it is stated: There is dirt in them. Abu Dawud also narrated on the authority of Ya`la ibn Shaddad ibn Aws from his father who said: "The Messenger of Allah (peace be upon him) said: Be different from the Jews, as they do not pray in their shoes or in their leather slippers Abu Dawud also narrated (Part No. 6; Page No. 214) on the authority of `Amr ibn Shu`ayb from his father from his grandfather who said: I saw the Messenger of Allah (peace be upon him) praying both barefooted and wearing footwear. Narrated by Ibn Majah. However, if the Masjids are furnished with fancy carpets, then they should be kept clean from shoes, and no one should enter wearing shoes lest the place be made dirty. If the carpets get soiled with dirt, this will offend those who pray and prostrate on them.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.