Abu Hurairah said, I heard the Messenger of Allah ﷺ say, "No child of Adam is born without Satan touching him at the moment of his birth, so that he cries out from Satan's touch, except for Mary and her son."Then Abu Hurairah recited, "And when she gave birth to her, she said, 'My Lord, I have given birth to a female,' and Allah knew best what she had delivered, 'and the male is not like the female. I have named her Mary, and I seek Your protection for her and her offspring from Satan the accursed.'" [Al Imran 3:36]
سمعت رسول الله ﷺ يقول: ما من بني آدم مولود إلا يمسه الشيطان حين يولد، فيستهل صارخا من مس الشيطان غير مريم وابنها، ثم يقول أبو هريرة: {فلما وضعتها قالت رب إني وضعتها أنثى والله أعلم بما وضعت وليس الذكر كالأنثى وإني سميتها مريم وإني أعيذها بك وذريتها من الشيطن الرجيم} [آل عمران: ٣٦].
Bukhari narrated it in the chapters on the Prophets (3431) and Muslim in the Virtues (2366-146), both through Zuhri, who said, Saeed bin Musayab told us, he said, Abu Hurairah said, and then he mentioned it. This is the wording of Bukhari, and the wording of Muslim is similar to it, but with "the devil jabbed him" in place of "the devil touched him." Muslim also narrated it (2367-148) through another route, from Suhayl, from his father, from Abu Hurairah, as a raised report, with the wording, "The crying of the newborn when it is born is a jab from the devil."