It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The key to prayer is purification, the thing that makes lawful things unlawful in prayer is the opening takbeer (takbeer tahrimah), and the thing that makes them lawful again is the salutation (salaam)."
Hadith Referenceمسند احمد / مسند الخلفاء الراشدين / 1006
Hadith Gradingحکم دارالسلام:صحيح لغيره، وإسناده حسن