Amr bin Maymun (may Allah have mercy on him) says: I saw Umar bin al-Khattab (may Allah be pleased with him). When he passed between the two rows, if he saw a gap he would say: "Straighten up," and when he saw no gap among them, he would step forward and say the takbir. Sometimes he (may Allah be pleased with him) would recite Surah Yusuf or Surah al-Nahl or the like in the first rak'ah, so that the people could gather. The narrator says: He had no sooner said 'Allahu Akbar' (Allah is the Greatest) than I heard him (may Allah be pleased with him) saying: "The dog has killed me," or he said: "The dog has eaten me," at the moment he stabbed him. Then the foreigner rushed off with a two-edged knife; he did not pass anyone on the right or the left without stabbing him, until he had stabbed thirteen men, nine of whom were martyred. When a man from the Muslims saw this, he threw his cloak over him, and when the man realised that he had been caught, he slit his own throat. Umar (may Allah be pleased with him) took Abd al-Rahman bin Awf (may Allah be pleased with him) by the hand and put him forward. He says: Those who were near Umar saw what they saw, but as for the far sides of the mosque, they did not know anything except that they had lost the voice of Umar (may Allah be pleased with him), and they were saying 'Subhan Allah, Subhan Allah' (Glory be to Allah, Glory be to Allah). Abd al-Rahman bin Awf (may Allah be pleased with him) led them in a light prayer.
Note: Imam al-Shafi'i (may Allah have mercy on him) holds it permissible for someone to become the imam's deputy in this way in his new school (madhhab), whereas in the old one it was not permissible.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5255