The genealogy of the Safawi dynasty can be traced to a certain Firuz Shah, surnamed Zarrin Kulah "golden cap", who settled in Ardabil during the twelfth century AD. The name of the dynasty is take from Sheikh Safi ud-din 'Abdu'l Fath Ishaq (b. 1252; d. 12th September 1334), founder and Grand Master of a Sufi religious order at Ardabil in 1301. Converting from the Sunni to the Shi'ite sect, his descendant Junaid became a zealous propagator of the Shi'ite faith, extending his influence over large areas of North Western Persia, Anatolia, Syria, Mesopotamia and Armenia. Temporal power soon followed in the wake of his religious successes with the establishment of the Qizilbashes (red caps), a powerful military force including a large number of nomadic tribes. They were eventually strong enough to seize the reigns of temporal power and install their Grand Master as Shah Ismail I in 1501. His descendants ruled Persia until the Afghan invasions of 1719 and 1722 reduced them to puppets in the hands of others. However, they continued to be recognised as Shahhanshahs, at least in some parts of the country, for a further 60 years. The last Shah of the dynasty was finally deposed and exiled to India in 1786.