Madrid, the capital of Spain, is located in the center of the country.