The people of war said to a Prophet they had captured: “If you say, ‘I am not a Prophet,’ we will release you; otherwise, we will kill you.” In such a case, it would not be permissible for him to utter that statement. However, if it were said to someone other than a Prophet: “If you say, ‘This man is not a Prophet,’ we will spare your Prophet, but if you say, ‘He is a Prophet,’ we will kill him,” then it would be permissible, since lying cannot be attributed to Prophets. (Radd al-Muhtar, end of Kitab al-Ikrah, vol. 6, p. 142)
Since Muhammad Peace Be Upon Him has passed away and there will be no Prophet after him, how can the above-mentioned case be interpreted? Please clarify, and you shall be rewarded.
This issue has been mentioned hypothetically only to illustrate the impossibility of attributing falsehood to the Prophets. However, near the end of times, at the descent of Isa (peace be upon him), May God forbid, such circumstances were to arise during a battle with the people of war, then this ruling could also become practically applicable. Moreover, from this juristic detail and principle, several other rulings can also be derived.