Abu Kathir narrates from his master, Muhammad bin Abdullah bin Jahsh (may Allah be pleased with him), that he said: I was with the Messenger of Allah (peace and blessings be upon him). He (peace and blessings be upon him) passed by Ma'mar (may Allah be pleased with him), who was sitting near his house in the market with both his thighs uncovered. The Prophet (peace and blessings be upon him) said: "O Ma'mar! Cover your thighs, for the thighs are part of the awrah."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3230