The earliest history of the activity of economic and financial control of the public domain situated in the late Middle Ages, though no direct relationship with the Court of Auditors as it is currently configured can be established. In this context, it is important to note the existence of such figures as the Mayor in Domus, contained in the Code of the “Siete Partidas” of Alfonso X the Wise, the Contador Mayor in the Spanish Court and Wise Master in the Kingdom of Aragon.
Under the reign of Juan II, King of Castile and Leon, the creation of the Casa de Cuentas of Valladolid and the Contaduría Mayor de Cuentas, historical background to the Court of Auditors, took place. The Cámara de Comptos was built in Navarra. It fulfilled the duties of the Court of Auditors in terms of income tax matters.
In the 16th Century, Felipe II ordered the creation of a Court of Accounts to replace the previous institutions, whose purpose was to rule on disputes concerning the public economic and financial governance and accounting.
The Constitution of 1812, passed by the Cortes of Cadiz, provided for the creation of an Accounting Office"to examine all accounts of public funds". In 1828, the ordinance establishing the Highest Court of Auditors was approved, which was in force until 1851. In 1828, the ordinance establishing the Highest Court of Auditors was approved, which was in force until 1851.
During the regime established in the Constitution of 1845, a series of major reforms were carried out in the financial administration of the State and the Organic Act of the Court of Auditors, 1851 was approved, which is the seed of the current institution, with responsibility for the financial control of Public Administration.
In 1870, a new Law on Organization of the Court of Auditors of the Kingdom was approved and was in force until the Supreme Court of the Treasury was established in 1924, which integrated both external and internal control functions of the public sector.
The Court of Auditors of the Republic was established in the Constitution of 1931 as the supreme audit body of the economic and management in the public sector and its Organic Act was approved in 1934.
Rules for adapting the institution to the political regime in force became established later. A Law on Organization, Functions and Procedures of the Court of Auditors of the Kingdom was approved in 1953, amended in 1961, in which the Court of Auditors was defined as the supreme external audit body of the State, with the function of reporting to the Head of State and the courts of the result of its audit activity and the recognition of a genuine judicial function.
The Court of Auditors is configured at present by the Constitution of 1978 as the supreme audit body of the economic and management in the public sector, which is independent from the executive power and is directly linked to the Spanish Parliament.