The Secretary of State or Secretary of State and of the Office was the title given in Spain to the King's ministers[1][2] during the Ancient Regime of Spain, between the 17th century and the mid-19th century, when it was definitively replaced by the term "minister". It should be clarified that the Secretaries of State and of the Office of State, i.e. the heads of the Secretariat in charge of foreign affairs, were commonly known as Secretaries of State and, although they had the same rank as the other Secretaries of the Office, the Secretary of State assumed the leading role, presiding over the meetings of the ministers and attending to the most important matters.
Their origins lie in the secretaries of the 16th century Council of State, but with the reforms of Philip V, the polysynodial configuration of the Councils declined (with the exception of the Council of Castile), and it was the Secretary of State and of the Office that became the most important institution in the governmental structure, established for specific matters from 1714 onwards.