Talq bin Ali reported,

We set out as a delegation until we reached the Messenger of Allah ﷺ. We pledged our allegiance to him and prayed with him. When he finished the prayer, a man who appeared to be a bedouin came and asked, "Messenger of Allah, what do you say about a man who touches his penis during the prayer?"He replied, "Is it anything but a piece of flesh from you, or a part of you?"

Nasai 165

Sahih

أخبرنا هناد عن ملازم قال حدثنا عبد الله بن بدر

عن قيس بن طلق بن علي عن أبيه قال

خرجنا وفدا حتى قدمنا على رسول الله ﷺ فبايعناه وصلينا معه فلما قضى الصلاة جاء رجل كأنه بدوي فقال يا رسول الله ما ترى في رجل مس ذكره في الصلاة قال وهل هو إلا مضغة منك أو بضعة منك

النسائي 165صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Purification
Chapter
Not performing wudu because of that
Numbering
Darussalam 165
Nasai 165