Sunan Abi Dawud, Hadith 4714

Abu Hurairah reported the Messenger of Allah (May peace be upon him) as saying : Every child is born on Islam, but his parents make him a Jew and a Christian, just as a beast is born whole. Do you find some among them (born) maimed? The people asked : Messenger of Allah! What do you think about the one who died while he was young? He replied : Allah knows best what he was going to do.

حَدَّثَنَا الْقَعْنَبِيُّ، عَنْ مَالِكٍ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ كُلُّ مَوْلُودٍ يُولَدُ عَلَى الْفِطْرَةِ فَأَبَوَاهُ يُهَوِّدَانِهِ وَيُنَصِّرَانِهِ كَمَا تَنَاتَجُ الإِبِلُ مِنْ بَهِيمَةٍ جَمْعَاءَ هَلْ تُحِسُّ مِنْ جَدْعَاءَ ‏"‏ ‏.‏ قَالُوا يَا رَسُولَ اللَّهِ أَفَرَأَيْتَ مَنْ يَمُوتُ وَهُوَ صَغِيرٌ قَالَ ‏"‏ اللَّهُ أَعْلَمُ بِمَا كَانُوا عَامِلِينَ ‏"‏ ‏.‏

sunnah.com

also referenced under: Hadith 4697 (Hasan)