Coimbra is the capital of the Kingdom of Portugal. One of the kingdom's important crossroads, Coimbra is historically at a junction between the Braga and Lisbon, and its river access (the Mondego flows through the city) provided a route between the interior communities and the coastal towns.
The reconquest of the territory was attained in 1064 by King Ferdinand I of León and Castile. Afonso Henriques, in order to confirm and reinforce the power of the concelho (municipality) conceded a formal foral (charter) in 1179.
Already in the Middle Ages, Coimbra was divided into an upper city (Cidade Alta or Almedina), where the aristocracy and the clergy lived, and the merchant, artisan and labour centres in the lower city (Arrabalde or Cidade Baixa) by the Mondego River, in addition to the old and new Jewish quarters. The city was encircled by a fortified wall, of which some remnants are still visible like the Almedina Gate (Porta da Almedina). Meanwhile, on the periphery, the municipality began to grow in various agglomerations, notably around the monasteries and convents that developed in Celas, Santa Clara, Santo António dos Olivais.
The University of Coimbra, was founded as a Studium Generale in Lisbon King Dinis I. In 1308, likely due to problems of emancipation from the Church (relations between the latter and the political power being somewhat strained at the time) and conflicts between the inhabitants of the city and the students, the University moved to Coimbra.