Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrates: Before the tashahhud was made obligatory upon us, we used to say: 'As-salamu 'ala Allahi qabla khalqih' (Peace be upon Allah before His creation), peace be upon Jibra'il and Mika'il. Then the Messenger of Allah (peace and blessings be upon him) taught us the tashahhud.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3962