عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ كَانَ نَاسٌ مِنَ الْأَسْرَى يَوْمَ بَدْرٍ لَمْ يَكُنْ لَهُمْ فِدَاءٌ فَجَعَلَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فِدَاءَهُمْ أَنْ يُعَلِّمُوا أَوْلَادَ الْأَنْصَارِ الْكِتَابَةَ قَالَ فَجَاءَ يَوْمًا غُلَامٌ يَبْكِي إِلَى أَبِيهِ فَقَالَ مَا شَأْنُكَ قَالَ ضَرَبَنِي مُعَلِّمِي قَالَ الْخَبِيثُ يَطْلُبُ بِذَحْلِ بَدْرٍ وَاللَّهِ لَا تَأْتِيهِ أَبَدًا
It is narrated from Sayyiduna Abdullah bin Abbas, may Allah be pleased with them both, that some of the captives of Badr did not possess anything to give as ransom, so the Messenger of Allah, peace and blessings be upon him, set their ransom as teaching the Ansari children how to write. One day, one of those children came to his father crying. He asked: Son! What happened to you? He replied: My teacher hit me. He said: Wretch, he wants to take revenge for Badr. By Allah! You will never go to him again.