Thami was born in 1879 in the Imezouaren family, in the Ait Telouet tribe, a clan of the Southern
Glaoua. His family was originally in a place called Tigemmi n'Imezouaren in the Fatwaka tribe, near the
Tassaout river. His father was the
qaid of
Telouet, Mohammed ben Hammou, known as
Tibibit, and his mother was Zouhra Oum El Khaïr, a black slave. When Si Mohammed died on 4 August 1886, his eldest son Si Mhamed took over his father's position and then died the same year. After the death of Si M'hammed, his brother
Si Madani took power and put his brother T'hami as his
khalifat (assistant). In the autumn of 1893,
Sultan Moulay Hassan and his army were crossing the
High Atlas mountains after a tax-gathering expedition when they were caught in a blizzard. They were rescued by Si Madani, and the grateful Sultan bestowed on Si Madani from
Tafilalt to the
Sous. In addition, he presented the Glaoua arsenal with a working 77-mm
Krupp cannon, the only such weapon in Morocco outside the imperial army. The Glaoua army used this weapon to subdue rival warlords. In 1902, Madani, T'hami and the Glaoua force joined the imperial army of
Moulay Abdelaziz as it marched against the pretender
Bou Hamara. The Sultan's forces were routed by the pretender. Madani became a scapegoat, and spent months of humiliation at court before being allowed to return home. He thereupon began to actively work to depose Moulay Abdelaziz. This was achieved in 1907 with the enthronement of
Abdelhafid of Morocco, who rewarded the Glaoua by appointing Si Madani as his Grand Vizier, and T'hami as Pasha of Marrakesh. ==French influence==