I asked Anas bin Malik about the qunut in the prayer.He said, "Yes, it was performed."I asked, "Was it before the bowing or after it?"He replied, "Before it."I said, "But so-and-so told me on your authority that you said it was after the bowing."He said, "He lied. The Messenger of Allah ﷺ only made qunut after the bowing for one month. He had sent some people known as the Reciters, seventy men in number, to a group of polytheists who had a treaty with the Messenger of Allah ﷺ. But these people who had a treaty with the Messenger of Allah ﷺ overcame them and killed them. So the Messenger of Allah ﷺ made qunut after the bowing for a month, supplicating against them."
سألت أنس بن مالك رضي الله عنه عن القنوت في الصلاة؟ فقال: نعم، فقلت: فقلت: كان قبل الركوع أو بعده؟ قال: قبله، قلت: فإن فلانا أخبرني عنك أنك قلت بعده، قال: كذب، إنما قنت رسول الله ﷺ بعد الركوع شهرا: إنه كان بعث ناسا يقال لهم القراء، وهم سبعون رجلا، إلى ناس من المشركين، وبينهم وبين رسول الله ﷺ عهد قبلهم، فظهر هؤلاء الذين كانوا بينهم وبين رسول الله ﷺ عهد، فقنت رسول الله ﷺ بعد الركوع شهرا يدعو عليهم.
Bukhari (4096) narrated it from Musa bin Ismail, who said, Abdul-Wahid narrated to us, who said, Asim al-Ahwal narrated to us, and he said, then he related it.Al-Ayni said, "The sense of the statement is that he sent [some companions] to a group of polytheists who had no covenant with the Muslims, while there was, between the Messenger of Allah ﷺ and another group among them, the counterparts of those to whom he was sent, an actual covenant. So those bound by the covenant overpowered them and acted treacherously, killing the Quran reciters who had been sent to reinforce them against their enemy." Umdat Qari (176/17)