Anas bin Malik reported,

The Prophet ﷺ sent seventy men, known as the Reciters, on a mission. Two clans of Banu Sulaym, Ril and Zakwan, intercepted them at a well called Bir Maunah. The men said, "By Allah, we did not intend to fight you. We are only passing through on a mission for the Prophet ﷺ." But they killed them. So the Prophet ﷺ invoked Allah against them for a month during the dawn prayer, and that was the beginning of the qunut, for we had not been performing qunut before that.Abd al-Aziz said, A man asked Anas about the qunut, "Is it after the bowing, or upon finishing the recitation?"He replied, "No, rather upon finishing the recitation."

Azami 2840

Sahih

عن أنس بن مالك قال

بعث النبي ﷺ سبعين رجلا لحاجة، يقال لهم القراء، فعرض لهم حيان من بني سليم: رعل وذكوان عند بئر يقال لها بئر معونة، فقال القوم: والله ما إياكم أردنا، إنما نحن مجتازون في حاجة للنبي ﷺ فقتلوهم، فدعا النبي ﷺ عليهم شهرا في صلاة الغداة، وذلك بدق القنوت وما كنا نقنت. قال عبد العزيز: وسأل رجل أنسا عن القنوت: أبعد الركوع، أو عند فراغ من القراءة؟ قال: لا بل عند فراغ من القراءة.

الأعظمي 2840صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Witr prayer
Section
Beginning of qunut
Numbering
Jami al-Kamil 2840 (2nd edition)
Azami 2840