Abu al-Walid asked Ibn Umar (may Allah be pleased with them both): How did the use of saffron perfume in the mosque begin? He said: The Prophet (peace and blessings be upon him) came into the mosque and saw phlegm in the mosque on the qiblah side. He (peace and blessings be upon him) said: "Something other than this would be better." A man heard this, so he brought saffron; he scraped it off and rubbed saffron in its place. He (peace and blessings be upon him) said: "This is better than the first," and then the people did the same.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4310