Madrid, a right-wing capital that is an exception in Europe
Big cities, in general, are more left-wing than their countries as a whole. And it is not by chance: it is a consequence of the historical processes of formation of cities. Since the end of the 19th century, in most industrialising countries, the industrial working class began to concentrate in their metropolis. And, as a consequence, the left became stronger, both in terms of trade union movements and, later, in terms of socialist, communist, or labour parties. Over time, even as old industry disappeared from the cities, those industrial origins left an almost universal legacy of cities that were more progressive than the rest of their countries.
This can be explained, in part, by the cultural legacy of the old workerist tradition. And partly, also, by an effect of social composition. Neighbourhoods built in times of industrialisation have attracted new residents with popular socioeconomic profiles that favour cities' leftist bias. Even residents of wealthier metropolis tend to be more progressive than those in the rest of the country. The creative classes, minorities of immigrant origin, what remains of the industrial working class, and service sector workers often form progressive alliances. The growing weight of cultural and value factors has also favoured these left-wing urban alliances.
This, as Stanford University political science professor Jonathan Rodden explains in his book Why cities lose, means that the left is often at an electoral disadvantage because electoral systems tend to favour, through various mechanisms, the rural and dispersed vote over the urban vote.
In any case, cities' left-wing bias has few exceptions. Madrid is a very prominent one. In fact, if we look at the results of the last general elections in the main Western European countries, we find that only in Spain do the right-wingers have more weight in the capital than in the state as a whole. In some cases the differences are very notable, as in most northern European countries, while in other cases they are more modest. However, the only case in which the right has consistently better results in the capital, is Spain.
This exception in Madrid is very important. Because beyond its quantitative weight, what happens in the capital of a state has a great capacity to condition the politics of the whole country. The qualitative value of Madrid's politics is greater than its demographic weight. The institutions, the bulk of central government officials, the media, and much of the economic power are concentrated in the capital. That's why what happens in Madrid has a disproportionate impact on the whole of Spain. A good example of this is the coverage of these regional elections.
The reasons for this Spanish exceptionality are complex. In the 1930s, and also at the beginning of democracy, Madrid was more left-wing than the state as a whole. Even so, for decades now the right has had more weight in Madrid than in the rest of Spain, and has consolidated a long and unappealable political and cultural hegemony.
Possibly the fact that Madrid's urban development has not responded to the traditional industrial pattern is one of the most decisive factors. The heritage of the industrial working class is weaker, because it is a less industrial metropolis than most capital cities. However, in its historical development, the state apparatuses have had a great weight. The civil service and those who move around it are a very decisive group in Madrid. This, combined with the fact that the state apparatuses in Spain were controlled by Franco's regime for much of the 20th century, has probably contributed to this conservative bias in the capital.
Post-industrial economy
We can also think that in the transition to a post-industrial economy (very successful, in the case of Madrid) the concentration of workers in sectors such as finance or executives of large companies has contributed to the formation of a conservative upper-middle class. They are the inhabitants of housing estates, with private health insurance and private schools.
Finally, beyond the structural factors, there are the ideological elements. And here Spanish nationalism plays a major role, especially in the capital. The fact that there are at least two open national conflicts in Spain, in Catalonia and the Basque Country, means that Spanish nationalism has not been a banal and invisible nationalism like those in most European countries; on the contrary: an explicit, intense and often aggressive Spanish nationalism has been built up that has favoured the right.