Sahih al-Bukhari, Hadith 4097

Narrated Ibn `Umar: That the Prophet inspected him on the day of Uhud while he was fourteen years old, and the Prophet did not allow him to take part in the battle. He was inspected again by the Prophet on the day of Al- Khandaq (i.e. battle of the Trench) while he was fifteen years old, and the Prophet allowed him to take Part in the battle.

حَدَّثَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا يَحْيَى بْنُ سَعِيدٍ، عَنْ عُبَيْدِ اللَّهِ، قَالَ أَخْبَرَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ ـ رضى الله عنهما أَنَّ النَّبِيَّ صلى الله عليه وسلم عَرَضَهُ يَوْمَ أُحُدٍ وَهْوَ ابْنُ أَرْبَعَ عَشْرَةَ فَلَمْ يُجِزْهُ، وَعَرَضَهُ يَوْمَ الْخَنْدَقِ وَهْوَ ابْنُ خَمْسَ عَشْرَةَ فَأَجَازَهُ‏.‏

sunnah.com