Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: "What makes the prayer sacred (forbidding all else) is the takbir, and what releases from it is the salam. And when you have given the salam and some need is pressing you, then leave before (the imam) turns his face."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9239