It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) would say "Sami'a Allahu liman hamidah, Rabbana wa laka al-hamd" (Allah hears the one who praises Him; Our Lord, and to You belongs all praise), then before prostrating he would say: "O Allah, curse so-and-so and so-and-so," then he would say the takbir and prostrate, until Allah, the Mighty and Majestic, revealed this verse: "Not for you is the decision in the matter at all" [Surah Al Imran: 128].
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13057