Zayd bin Wahb (may Allah have mercy on him) said: I entered the mosque with Sayyiduna Ibn Mas'ud (may Allah be pleased with him) while the people were bowing, so he bowed and I bowed with him, and we walked in the state of bowing until we reached the row. Then they raised their heads, and we prayed our prayer. When the imam gave the salam, I thought that (a) rak'ah had passed me, so I stood up to make it up, but Sayyiduna Ibn Mas'ud (may Allah be pleased with him) pulled me back and said: "You have caught (the rak'ah)."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9323