Jimena de la Frontera dates back to Roman times, when it was known as Oba and issued its own coinage.
At the beginning of the 13th century it became inhabited by the Moors, who renamed the town Xemina.
In the 15th century Jimena became a Frontera (frontier) town in the battles between the Moors and Christians.
The town was taken from the Moors for the last time by King Enrique IV and was rewarded for its services
to the crown by being given the status Loyal.
In 1879 King Alfonso XII again rewarded the town for its loyalty by granting it the title of city.
The remains of the castle are at the top of the hill overlooking the town on the east side and the valley
of the river Hozgarganta on the west side.
Along the river run the ruins of a 650m canal once used to drive the bellows of the royal artillery
factory of King Carlos III where much of the munitions for the Great Siege of Gibraltar were
manufactured. A dam built into the river controlled the flow of water.
The existing castle was built on the site of the roman village and the earliest fortifications date
back to the seventh century AD. It was not until the Moorish occupation in the eighth century that
the castle became of real importance. On the west side of the castle, cut into the rocks, is a pool that
is known as the Moorish Queen's Bath. But some scholars believe that the pool is actually part of a
Moorish temple.
Although the Romans built the first settlement here, there are prehistoric paintings in caves on
the outskirts of the town. Other points of interest include a fifteenth century sanctuary built 2km
outside the town centre, a sixteenth century convent in the upper town, the remains of a church
with neoclassical architecture in the main square and, below the castle, the first church built after
the Christian conquest of Jimena, dating back to the second half of the XVth century.