A silk garment was gifted to the Prophet ﷺ, so he put it on and prayed in it. Then he left and pulled it off forcefully, as if disliking it, and said, "This is not befitting for the God-fearing."
أهدي إلى النبي ﷺ فروج حرير فلبسه، فصلى فيه، ثم انصرف فنزعه نزعا شديدا كالكاره له وقال: لا ينبغي هذا للمتقين.
Bukhari narrated it in the Book of Prayer (375), and Muslim in the Book of Clothing (2075), both through the route of Layth, from Yazid bin Abu Habib, from Abu Khayr, from Uqba bin Amir, who related it.Ibn Hajar said, "The apparent meaning of this hadith is that his ﷺ prayer in it took place before the prohibition of wearing silk was revealed. This is supported by the hadith of Jabir recorded by Muslim (in the Book of Clothing, 2070), the wording of which is, 'The Prophet ﷺ wore, one day, a silk cloak that had been given to him as a gift. He then hastened to take it off and sent it to Umar bin Khattab. It was said to him, "You hastened to remove it, Messenger of Allah." He said, "Jibreel forbade it to me." Umar then came to him weeping and said, "Messenger of Allah, you disliked something and yet gave it to me, so what is my situation?" He said, "I did not give it to you to wear. I only gave it to you to sell." So Umar sold it for two thousand dirhams.'"He also said, "This is further supported by what is implied in his saying, 'This is not fitting for the righteous,' since the righteous and others are equal in this prohibition." He continued, "So there is no argument in it for one who permits prayer while wearing silk garments, since his ﷺ not repeating the prayer was because it had taken place before the prohibition. As for after the prohibition, according to the majority the prayer is still valid, though the wearing itself remains forbidden. Malik, however, held that it should be repeated within its time." End of quote.