Ata' narrates from Jabir bin Abdullah (may Allah be pleased with them both): We offered the Fear Prayer with the Prophet (peace and blessings be upon him), and the enemy was between us and the qiblah. He (peace and blessings be upon him) said the takbir and we said the takbir too. We bowed with him (peace and blessings be upon him). Then, after raising his head from bowing, he (peace and blessings be upon him) prostrated, and the first row prostrated with him (peace and blessings be upon him). The second row remained standing facing the enemy. When he (peace and blessings be upon him) and the first row stood up, the second row then prostrated. Then the first row moved back and the second row went to the place of the first row. We all bowed together with him (peace and blessings be upon him). Then he (peace and blessings be upon him) prostrated. Then, when he rose and prostrated, the first row prostrated with him (peace and blessings be upon him) and sat, and then the second row went down into prostration. Then he (peace and blessings be upon him) gave the salam, and we also gave the salam. Jabir (may Allah be pleased with him) said: This is just as the royal guards do with their commanders.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5631