It is placed to an altitude of 280 meters and to approximately 50 km from the capital of the province, Cordova.
Aguilar of the Border is the former Ipagrum Iberian - Roman, involved in the battle of Munda, that faced the supporters of César with those of Pompeyo. Precisely of this period, it is his more ancient remains, a necropolis of big dimensions.
The Moslem conquest of the city did that he was happening then to be named Bulay or Poley, probably deriving from the Greek. The defeat, on April 5 of the year 891, of his Christian settlers and of the rebellious troops opposite to the troops of the Emir Abdallah, did that the population was happening to belong to the core of Goat. Some time later, in the 11th century, Poley was included in the kingdom zirí of Granada.
To the beginning of the reign of Pedro I, Alfonso Fernandez Coronel, who had received only it was doing a few months the dominion, he rebelled against the king. Of " Aguilar, Aguilar " to himself had made the shout habitual between the rebels in Castile from beginning of this century, so, squashed the revolt, Pedro, I decided to change Aguilar's name for of that of Monterreal, and the shield of the eagle for that of a king sat with the exposed sword.
After the Castilian civil wars, which face Pedro I and Enrique II, the villa happens to belong to Gonzalo Fernandez of Cordova. The XVIIth and XVIIIth centuries represent a stage of decadence and crisis for the locality, due to the strong population decrease caused by the epidemics.