The Khoja or Khuwaja are a mainly Nizari Isma'ili Shia community of people originating in Gujarat, India. The word Khoja is derived from the Persian word Khwaja, a term of honor, the word Khoja is used to refer to members of Baniya caste groups (Vaishyas), who converted to Islam from Hinduism under Muslim pirs (saints).
In India, most Khojas live in the states of Gujarat, Maharashtra, Rajasthan and the city of Hyderabad. Many Khojas have also migrated and settled over the centuries in East Africa, the Caribbean, Europe and North America. The Khoja were by then adherents of Nizari Isma'ilism. In the late 19th and early 20th centuries, particularly in the aftermath of the Aga Khan Case a significant minority separated and adopted Sunni Islam and Twelver shi'ism, while the majority remained Nizari Isma'ili. In Pakistan, most Khoja live in Karachi in Sindh province.
The term Khoja derives from Khwāja (New Persian Khājé), a Persian honorific title (خواجه) of pious individuals used in Turco-Persian influenced regions of the Muslim world.
The specific term Khoja in the Gujarati and Sindhi languages, was first bestowed by the Persianate Nizari Isma'ili Sadardin (died c. 15th century) upon his followers during the lifetime of the Nizari Ismaili Imam Islam Shah (1368-1423 CE). As such, Pir Shihab al-din Shah, brother of one of the Nizari Ismaili imams, wrote regarding the origins of the Khojas that the very formation of the community came about through Pir Sadardin's devotion to the Imam.
Many Lohanas of Gujarat converted to Nizari Ismailism due to the efforts of Pir Sadardin. They gradually used the title Khoja. Before the arrival of the Aga Khan from Persia to British ruled India in the 19th century, Khojas retained many Hindu traditions, including a variation on the belief in the Dashavatara.
The Khoja converted from Hinduism to Islam under the influence of pirs. Derived from the Persian khwaja, a term of honour, the word Khoja refers to these Lohana converts to Nizari Ismaili Islam in medieval India (from about the 13th century onward).