quality:corruption, information:extraction, quality:correction
Recent history

After the fall of the Francoist regime, the new 1978 constitution confirmed Madrid as the capital of Spain. The 1979 municipal election brought Madrid's first democratically elected mayor since the Second Republic to power.

Madrid was the scene of some of the most important events of the time, such as the mass demonstrations of support for democracy after the failed coup, 23-F, on 23 February 1981. The first democratic mayors belonged to the centre-left PSOE (Enrique Tierno Galván, Juan Barranco Gallardo). Since the late 1970s and through the 1980s Madrid became the center of the cultural movement known as la Movida. Conversely, just like in the rest of the country, a heroin crisis took a toll in the poor neighborhoods of Madrid in the 1980s.

Benefiting from increasing prosperity in the 1980s and 1990s, the capital city of Spain consolidated its position as an important economic, cultural, industrial, educational, and technological centre on the European continent. During the mandate as Mayor of José María Álvarez del Manzano construction of traffic tunnels below the city proliferated. The following administrations, also conservative, led by Alberto Ruiz-Gallardón and Ana Botella launched three unsuccessful bids for the 2012, 2016 and 2020 Summer Olympics. By 2005, Madrid was the leading European destination for migrants from developing countries, as well as the largest employer of non-European workforce in Spain. Madrid was a centre of the anti-austerity protests that erupted in Spain in 2011. As consequence of the spillover of the 2008 financial and mortgage crisis, Madrid has been affected by the increasing number of second-hand homes held by banks and house evictions. The mandate of left-wing Mayor Manuela Carmena (2015–2019) delivered the renaturalization of the course of the Manzanares across the city.

Since the late 2010s, the challenges the city faces include the increasingly unaffordable rental prices (often in parallel with the gentrification and the spike of tourist apartments in the city centre) and the profusion of betting shops in working-class areas, leading to an "epidemic" of gambling among young people.