Sayyiduna Imran Bin Husayn RadiAllahu Ta'la Anhu has said: The Holy Prophet ﷺ said: Ali is from me and i am from Ali, and he is the wali of every believer. (Jami tirmizi, vol. 5, pp. 498, Hadis 3732) What is meant by 'Wali' here? Shaykh Mufti Ahmad Yar Khan has explained that here 'Wali' does not mean caliph, rather it means 'friend' or 'helper'. As Allah Azzawajal said: None is your friend but Allah and the Holy Prophet ﷺ and the true believers. [Kanz-ul-Iman(Translation of Quran)] (Part 6, Surah Al-Maidah, verse 55). Here also 'Wali' means helper. The aforementioned Hadis has revealed two facts. Firstly, invoking 'Ya Ali Madad' during trouble is permissible because Sayyiduna Ali RadiAllahu Ta'la Anhu is the helper of all the true believers till the day of Judgement. Secondly, calling him 'Maula Ali' is also permissible as he RadiAllahu Ta'la Anhu is wali and Maula of all the Muslims. (Mirat-ul-Manajih, vol. 8, pp. 417)