At the end of the 17th century, Almedinilla was a part of Priego and it did not achieve independence as a municipality until 1844. It took part in the period of progress corresponding to the 18th century, with the colonisation of land for cultivation, construction of looms, flour mills and, in Priego, numerous public, religious and palatial buildings, erected by the baroque school of Priego.
The former church of Almedinilla was from this period but it was demolished in the 70s and nowadays, we only have the belfry of the bell tower and different religious carvings.
There seems to have existed in Almedinilla a previous hermitage (sixteenth and seventeenth centuries) and perhaps a small group of orchards and houses for the Marquis of Priego’s tenant farmers, because in 1370, the lands of Priego conquered by the Christians, which were once integrated into the Casa de Aguilar (lordship of Gonzalo Fernández from Cordoba) passed to his descendant, Don Pedro. In 1502, he was granted the title of First Marquis of Priego by Ferdinand the Catholic. These titles, properties and privileges were later (1682) integrated into the Duchy of Medinaceli, maintaining their relevance until the early twentieth century.
Previously, during the 13th-14th-15th centuries, this area must have been depopulated and undercultivated as it was a borderland between the Christian kingdom and the Nasrid kingdom (between Priego and Alcalá La Real), after the conquest of Priego by Fernando III in 1225 (who handed over the territory to the Order of Calatrava) and by Alfonso XI in 1340.