In time, real power came to rest with the pasha's corps of janissaries, a self-governing military guild, and in time the pasha's role was reduced to that of ceremonial head of state. Mutinies and coups were frequent, and in 1611 the "deys" staged a coup against the pasha, and Dey Sulayman Safar was appointed as head of government. For the next hundred years, a series of "deys" effectively ruled Tripolitania, some for only a few weeks, and at various times the dey was also pasha-regent. The regency governed by the dey was autonomous in internal affairs and, although dependent on the sultan for fresh recruits to the corps of janissaries, his government was left to pursue a virtually independent foreign policy as well. The two most important Deys were Mehmed Saqizli (r. 1631–49) and Osman Saqizli (r. 1649–72), both also Pasha, who ruled effectively the region. The latter conquered also Cyrenaica.