Sahih al-Bukhari, Book 10, Hadith 145 (Bukhari 733)

Narrated `Aisha:

I asked Allah's Messenger (ﷺ) about looking hither and thither in prayer. He replied, "It is a way of stealing by which Satan takes away (a portion) from the prayer of a person."