Hadith on Prayer: Beware of ruin by distraction during prayer

Anas ibn Malik reported: The Messenger of Allah, peace and blessings be upon him, said, “O my son, beware of looking to the side during prayer, for distraction in prayer is a cause of ruin. If you must do so, then only in voluntary prayers and not obligatory prayers.”