The Community of Madrid is one of the seventeen autonomous communities (regions) of Spain. It is located at the centre of the country, the Iberian Peninsula, and the Castilian Central Plateau (Meseta Central). It is conterminous with the province of Madrid, making it "uniprovincial," or a community with only one province. Its capital is the city of Madrid, which is also the national capital of Spain. It is bounded to the south and east by Castile–La Mancha and to the north and west by Castile and León. It has a population of 6,369,167 (2011) mostly concentrated at the metropolitan area of Madrid.
The creation of the contemporary Community of Madrid was preceded by an intense political debate during the "pre-autonomic" period; that is, the period of political debate that led to the institution of autonomous communities as the first-level political divisions of Spain consisted of provinces, a political division that had existed since the 1833 territorial division of Spain. Autonomous communities were to be created by one or more provinces with a distinct regional identity; since Madrid was part of the historical region of Castile, assigned to New Castile in the 1833 provincial organization, it was first planned that the province of Madrid would be part of the future community of Castile–La Mancha (which was roughly similar to New Castile, with the adding of the province of Albacete) but with some special considerations as the home of the national capital. The integrating provinces of Castile–La Mancha opposed such a special status, and after considering other options—like its inclusion to the community of Castile and León or its constitution as an entity similar to a federal district—it was decided that the province of Madrid would become a single-province autonomous community by appealing to the 144th article of the constitution, whereby the Parliament can authorize the creation of an autonomous community, even if it did not satisfy the requirement of having a distinct historical identity, if it was the "nation's interest". Thus, in 1983, the Community of Madrid was constituted and a Statute of Autonomy was approved taking over all the competences of the old Diputación Provincial and the new ones the Statute considered. The Community of Madrid statute also recognizes the castilian association of the community, and its membership in the castilian region.
The city of Madrid (Spanish: ) was designated as the capital of the community as well as has been explicitly designated as the capital of the country by the 1978 Constitution. Nonetheless, several proposals have been made to make other towns the capital of the community like Alcalá de Henares, in the 1980s, and more recently, Getafe, without any relevance.