the Thirty Years' War, meant the reinforcement of the Nation-State as a sovereign entity in its internal affairs and with sovereignty to maintain international relations. The ambassadors already existed and little by little they were reinforcing their duties, placing themselves as essential pieces of foreign policy, a foreign policy controlled by The Crown. At the beginning of the reign of Philip V, in 1705, the King created the Office of First Secretary of State, a kind-of Prime Minister entrusted with foreign relations and the Marquess of Grimaldo was appointed the first Secretary. This is considered by some to be the origin of the Ministry of Foreign Affairs, but most consider the initial date to be on 30 November 1714 because in this day, the King created four specific secretariats: State (foreign affairs), Justice, War and Navy and Indies. There was a fifth body created this day, the Veeduría General, responsible for finance and treasury affairs. Late period The position of First Secretary of State remained unchanged until the first third of the 19th century. After the Napoleonic Wars, the international relations changed and do so the foreign relations of Spain. In 1833 the Office was modified and renamed Ministry of State, with Francisco Cea Bermúdez as minister. With this change, Spain was endowed with an analogous institution to which the rest of European nations had in which two new bodies worked on, consular officials and the diplomats, who would eventually merge in 1928. It was precisely in 1928 that the Ministry of State merged with the Office of the Prime Minister returning to the times when the First Secretary of State was a king-of Premier with foreign affairs responsibilities. This just lasted two years because in 1930 the offices were split again. In spite of the continuous Spanish political instability, international relations and the Ministry remained stable, suffering the biggest change in 1938 when it was renamed Ministry of Foreign Affairs and the current headquarters are established in the Palace of Santa Cruz. A year later the Palace of Viana in Madrid was established as the official residence of the Foreign Minister and in 1942, the Diplomatic School was created. During the Spanish transition to democracy, the Foreign Ministry was a fundamental institution, since it was in charge of transmitting to the world the political change that Spanish society was living and promoting relations with Ibero-America and other priority regions