Madrid has been the capital of Spain since 1561. It was established as such by Philip III.
Yes, that is correct! Madrid became the capital of Spain in 1561 and remained so until 1808 when it was moved to Valladolid due to its proximity to the battlefield during the Spanish War of Independence. In 1830 Madrid regained its status as the national capital with the creation of a new constitution and elected government. The current mayor of Madrid is Manuela Carmena who took office on May 20th 2015 after winning the municipal elections held on April 28th.