Ibn Abbas reported that the Messenger of Allah ﷺ took the sword Dhul-Faqar as part of his share of the spoils on the day of Badr. Ibn Abbas said, "It is the very sword concerning which he had the vision on the day of Uhud."That was because when the polytheists came against him on the day of Uhud, the Messenger of Allah ﷺ was of the view that he should remain in Madinah and fight them there. But some men who had not been present at Badr said to him, "Messenger of Allah, lead us out to meet them so we can fight them at Uhud." They were hoping to attain the kind of merit that the people of Badr had attained.They kept urging the Messenger of Allah ﷺ until he put on his armor. Then they regretted it and said, "Messenger of Allah, stay here. The decision is yours."The Messenger of Allah ﷺ replied, "It is not fitting for a prophet, once he has put on his armor, to take it off until Allah judges between him and his enemy."Earlier, before he had put on his armor, the Messenger of Allah ﷺ had said to them that day, "I saw myself in a sturdy coat of mail, and I interpreted it as Madinah. I saw myself with a ram riding behind me, and I interpreted it as the ram of the enemy battalion. I saw that my sword Dhul-Faqar had a notch in it, and I interpreted it as a loss among you. I saw cattle being slaughtered, and by Allah, cattle is good, by Allah, cattle is good."
تنفل رسول الله صلى الله عليه وآله وسلم سيفه ذو الفقار يوم بدر قال ابن عباس: وهو الذي رأى فيه الرؤيا يوم أحد وذلك أن رسول الله صلى الله عليه وآله وسلم لما جاءه المشركون يوم أحد كان رأي رسول الله صلى الله عليه وآله وسلم أن يقيم بالمدينة يقاتلهم فيها فقال له ناس لم يكونوا شهدوا بدرا تخرج بنا يا رسول الله صلى الله عليه وآله وسلم إليهم نقاتلهم بأحد ورجوا أن يصيبهم من الفضيلة ما أصاب أهل بدر فما زالوا برسول الله صلى الله عليه وآله وسلم حتى لبس أداته فندموا وقالوا: يا رسول الله أقم فالرأي رأيك فقال رسول الله صلى الله عليه وآله وسلم: ما ينبغي لنبي أن يضع أداته بعد أن لبسها حتى يحكم الله بينه وبين عدوه وقال وكان لما قال لهم رسول الله صلى الله عليه وآله وسلم يومئذ قبل أن يلبس الأداة: إني رأيت أني في درع حصينة فأولتها المدينة وأني مردف كبشا، فأولته كبش الكتيبة، ورأيت أن سيفي ذا الفقار فل، فأولته فلا فيكم ورأيت بقرا تذبح فبقر والله خير، فبقر والله خير.
Hakim (2/128-129) narrated it from Abu Abbas Muhammad bin Yaqub, who reported that Muhammad bin Abdullah bin Abdul-Hakam informed them, that Ibn Wahb informed them, that Ibn Abu Zinad informed him, from his father, from Ubaydullah bin Abdullah bin Utba, from Ibn Abbas, and he related it.Tirmidhi (1561), Ibn Majah (2808), and Ahmad (2445) narrated it through various routes from Ibn Abu Zinad, in abridged form. Its chain of transmission is hasan because of Ibn Abu Zinad, and it is documented in detail in the chapter on jihad.