The term vakil was a short form of vakil'i shah (vicegerent of the Lord) or vakil'i mawla (vicegerent of the Imam), and the term vakil'i nafs'i nafis'i humayun (vicegerent of the Imam in both his spiritual and temporal capacities) was used in Iran for the hujjat, or Pir. The word vakil means representative. Ordinarily, the office of the vakil was coined for a responsible person to represent the hujjat or Pir. The Imams appointed the vakils, but some times, the hujjat also appointed with the consent of the Imam. In India, Muhammad Shah Dhullah (d. 1813) was the last vakil. The office of the vakil then vested in the Mukhi.