Muhammad al-Mahdi, also known as the Mahdi, is a central figure in Shia Islam, particularly among the Twelver sect. He is believed to be the hidden Imam who will return to bring justice and peace to the world, marking a significant messianic expectation within the Safavid Empire, which was a Shia state that promoted this belief as part of its identity and legitimacy.