Will is the book written by the Messenger of Allah during the final moments of his life

And the Will is a book written by the Messenger of Allah pbuhap during the final moments of his life, in obedience to His saying swt, {180 Prescribed for you when death approaches one of you if he leaves a will [is that he should make] a bequest for the parents and near relatives according to what is acceptable – a duty upon the righteous.}

The Will

The Prophet Muhammad pbuhap said to Ali bin Abi Talib on the night of his death,
“O Father of Al-Hassan, bring me a pen and a paper”, and he dictated his will until he came to a position where he said, “O Ali, there will be twelve Imams after me and after them there will be twelve Mahdis