The Grand Vizier.
Historical Ottoman Empire officials and ethnic groups.
The Supreme Vizier or Grand Vizier (Wazir-e Azam and Sadr Azam) was in several Muslim countries, the Prime Minister appointed by the rulers and hence the second man in the state, especially in the realms of Seljuk, Ghaznavid, the Ottoman Empire, the Safavid and Mughal Empire.
THIS officer is possessed of the first situation in the Turkish government. He is appointed by the Grand Signior (Sultan), in whose name he conducts every thing.
The most important affairs are entrusted to his charge, and he possesses the power of life and death over all. But as his authority and power are so great, he is also equally responsible not only to the Sultan, but the people, who not unfrequently demand his head, when unfortunate events, in themselves perhaps quite unconnected with this officer, or at least beyond his control, happen to take place.
A frequency of conflagration, a sudden dearness or scarcity of provisions, the defeat of an army, in short, any calamity whatsoever is a sufficient reason for the loss of his head. There have however been some limits put to the power of the Vizier during the reign of Selim III. He cannot order the head of any great character to be taken off but by the authority and sign, manual of the Sultan himself, nor of a military man without the consent of his commanders.