A ceremonial ramp leads acrosewhat used to be a moat into an impressive gateway , over the Portal de las Tables , the arch with a Latin inscription dating the wall to 1585 , during the reign of King Philip II of Spain .
The moat survived until the 19th century .