Middle Ages and Modern Age
During the 9th century, Baena was taken by the Muladi rebel Umar ben Hafsun, while in the following century, it housed the alcazaba where the governors of the Cora of Cabra resided. The Tercias, the wealth accumulated by the Church, and the payment of tithes in kind made it necessary to construct suitable buildings for these purposes.
In 1240, it was peacefully conquered by Ferdinand III, who granted it to his brother, Infante Alfonso de Molina. The tenure of Baena’s fortress was later held by Rodrigo Alfonso de León, the illegitimate son of Alfonso IX of León. According to some historians, after his death, the tenure of Baena passed into the hands of Infante Juan of Castile “the one of Tarifa,” son of Alfonso X the Wise.
During the reign of Muhammad II in Granada, Baena was besieged, with five Christian knights fighting against five Muslim warriors, whom they defeated. This event gave rise to the city's coat of arms.
At the beginning of the 15th century, Baena was granted as a lordship to Diego Fernández de Córdoba, but a lawsuit was filed against him. However, he ultimately received it in the mid-century. Under this family, during the first quarter of the 16th century, most of the construction of the Church of Santa María la Mayor and the Convent of Madre de Dios was carried out.
The 16th century was marked by strong demographic growth, followed, as in many Spanish towns, by a deep crisis in the 17th century and signs of recovery in the following century. During this period, agriculture became crucial to the city’s economy, although it was characterised by an unequal distribution of land, dominated by large estates and a significant number of landless peasants.
The abolition of the lordships in the 19th century raised hopes for the redistribution of land, but this was disappointed, as in many places in Spain, because the lands put up for sale ended up in the hands of the wealthiest. As an example, in 1821, the distribution of Monte Horquera took place, where more than 8,000 fanegas of land were privatized. Its new owners, perhaps due to a lack of financial resources or other causes, sold these properties, which were then acquired by the wealthier landowners.
Contemporary Age
In 1854, the town was affected by the so-called “epidemic of Asiatic cholera,” which led to the death of nearly 700 inhabitants in Baena. This, combined with the widespread hunger of those years, resulted in the emigration of many of Baena’s residents.
In 1913, Baena was granted the title of city by royal decree.
In 1918, the Luque-Baena railway line was inaugurated, a branch that connected Baena with the Linares-Puente Genil line and other routes of the Spanish railway network. In addition to passenger transport, this branch allowed the olive oil production to be exported to other national markets. However, its operation was never very profitable for the owning companies. After many years of service, the branch was closed on October 1, 1965.
The 20th century saw a significant expansion of Baena’s urban area, which doubled in size, and the establishment of several industrial zones. Baena has become a reference in the production of extra virgin olive oil, with its own Denomination of Origin.
It has excellent vineyards, included in the Montilla-Moriles Denomination of Origin, and a rich abundance of cereal lands. Industrial garment production has also been another source of employment in the second third of the 20th century. Baena has several cooperatives covering the aforementioned sectors. The population of Baena is stabilized around twenty thousand inhabitants, after overcoming the migration crisis of the 1960s.

