It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) ruled concerning debt that "it comes before the bequest."
The people of hadith do not regard this as established, because al-Harith al-A'war alone narrates it from Ali (may Allah be pleased with him), and al-Harith's report is not used as proof since the hadith masters have criticised him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12561
Sayyiduna Ali (may Allah be pleased with him) said: "You recite, 'after any bequest that is made or a debt' [Surah al-Nisa': 12], yet Allah Almighty has decreed (payment of) the debt before the bequest; and the full siblings (children of the same mother) take precedence over the paternal half-siblings in inheritance."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12562
Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Debt comes before the bequest, and there is no bequest for an heir."
Yahya bin Abi Unaysah narrated it in this way from Abu Ishaq from Asim, and Yahya is da'if (weak).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12563
It was said to Ibn Abbas (may Allah be pleased with them both): How do you command Umrah before Hajj, when Allah says: "And complete the Hajj and the Umrah for Allah" [Surah al-Baqarah: 196]? He said: How do you recite (the verse): debt before the bequest, or the bequest before debt? He said: The bequest before debt. Ibn Abbas (may Allah be pleased with them both) said: So which of the two do you begin with? They said: With debt. Ibn Abbas (may Allah be pleased with them both) said: It is just like that.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوصايا / 12564