Tafsir Ibn Kathir -> Surah An-Nisa -> First the Debts are Paid Off, then the Will, then the Fixed Inheritance

Allah said,

﴿مِن بَعْدِ وَصِيَّةٍ يُوصَى بِهَآ أَوْ دَيْنٍ﴾

((The distribution in all cases is) after the payment of legacies he may have bequeathed or debts.) The scholars of the Salaf and the Khalaf agree that paying debts comes before fulfilling the will, and this is apparent to those who read the Ayah carefully. Allah said next,

﴿ءَابَآؤُكُمْ وَأَبناؤُكُمْ لاَ تَدْرُونَ أَيُّهُمْ أَقْرَبُ لَكُمْ نَفْعاً﴾

(You know not which of them, whether your parents or your children, are nearest to you in benefit.) This Ayah means: We have appointed a share to the parents and children, contrary to the practice of Jahiliyyah and the early Islamic era, when the inheritance would go to the children, and parents get a share only if they were named in the will, as Ibn `Abbas stated. Allah abrogated this practice and appointed a fixed share for the children and for the parents. One may derive benefit in this life or for the Hereafter from his parents, the likes of which he could not get from his children. The opposite of this could also be true. Allah said,

﴿ءَابَآؤُكُمْ وَأَبناؤُكُمْ لاَ تَدْرُونَ أَيُّهُمْ أَقْرَبُ لَكُمْ نَفْعاً﴾

(You know not which of them, whether your parents or your children, are nearest to you in benefit,): since benefit could come from one or the other of these relatives, We appointed a fixed share of inheritance for each. Allah knows best. Allah said,

﴿فَرِيضَةً مِّنَ اللَّهِ﴾

(ordained by Allah), meaning: These appointed shares of inheritance that We mentioned and which give some inheritors a bigger share than others, is a commandment from Allah that He has decided and ordained,

﴿إِنَّ اللَّهَ كَانَ عَلِيماً حَكِيماً﴾

(And Allah is Ever All-Knower, All-Wise.), Who places everything in its rightful place and gives each his rightful share.

﴿وَلَكُمْ نِصْفُ مَا تَرَكَ أَزْوَجُكُمْ إِنْ لَّمْ يَكُنْ لَّهُنَّ وَلَدٌ فَإِن كَانَ لَهُنَّ وَلَدٌ فَلَكُمُ الرُّبُعُ مِمَّا تَرَكْنَ مِن بَعْدِ وَصِيَّةٍ يُوصِينَ بِهَآ أَوْ دَيْنٍ وَلَهُنَّ الرُّبُعُ مِمَّا تَرَكْتُمْ إِن لَّمْ يَكُنْ لَّكُمْ وَلَدٌ فَإِن كَانَ لَكُمْ وَلَدٌ فَلَهُنَّ الثُّمُنُ مِمَّا تَرَكْتُم مِّن بَعْدِ وَصِيَّةٍ تُوصُونَ بِهَآ أَوْ دَيْنٍ وَإِن كَانَ رَجُلٌ يُورَثُ كَلَـلَةً أَو امْرَأَةٌ وَلَهُ أَخٌ أَوْ أُخْتٌ فَلِكُلِّ وَحِدٍ مِّنْهُمَا السُّدُسُ فَإِن كَانُواْ أَكْثَرَ مِن ذلِكَ فَهُمْ شُرَكَآءُ فِى الثُّلُثِ مِن بَعْدِ وَصِيَّةٍ يُوصَى بِهَآ أَوْ دَيْنٍ غَيْرَ مُضَآرٍّ وَصِيَّةً مِّنَ اللَّهِ وَاللَّهُ عَلِيمٌ حَلِيمٌ ﴾

(12. In that which your wives leave, your share is half if they have no child; but if they leave a child, you get a fourth of that which they leave after payment of legacies that they may have bequeathed or debts. In that which you leave, their (your wives) share is a fourth if you leave no child; but if you leave a child, they get an eighth of that which you leave after payment of legacies that you may have bequeathed or debts. If the man or woman whose inheritance is in Kalalah has left neither ascendants nor descendants, but has left a brother or a sister, each one of the two gets a sixth; but if more than two, they share in a third; after payment of legacies he (or she) may have bequeathed or debts, so that no loss is caused (to anyone). This is a Commandment from Allah; and Allah is Ever All-Knowing, Most Forbearing.)