Muhammad bin al-Hanafiyyah (may Allah have mercy on him) narrates from Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The key to prayer is purification; what makes things forbidden in it is the takbir (that is, once the opening takbir is said, everything that contradicts the prayer becomes forbidden); and what makes them lawful again is the salam (that is, once the salam is said, all those acts become permissible)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3970