In 1821,
José de San Martín created three ministries of the
Protectorate of Peru: those of
Finance (
Hacienda), War and Navy (
Guerra y Marina) and
Foreign Affairs (
Relaciones Exteriores). They were again reestablished in 1844 after a series of changes in government. On March 21, 1824,
Simón Bolívar issued a decree in
Trujillo reducing the three ministries to a single one, which would become the
General Secretariat of Affairs of the Peruvian Republic (), under Colonel José Gabriel Pérez. However, shortly thereafter, the Governing Junta repealed the decree, reestablishing the three ministries. On October 13, 1920, during the
second government of President
Augusto B. Leguía, the Ministry of War and Navy was separated into two ministries through law N° 4003. The
Navy Aviator Corps () was created the same year as part of the
Peruvian Navy, with the Navy ministry being reorganised as the
Ministry of Navy and Aviation (), combining both military entities until 1941, when the
Ministry of Aviation (also known as the "Ministry of Aeronautics" ) was created. The Ministry of Defence was created by Law No. 24654 on 1 April 1987, during the government of
President Alan García. It absorbed the aforementioned Ministries of War, Navy and Aeronautics as well as the
Joint Command of the Armed Forces and the National Defence Secretariat. ==Organisation==