Peniscola, often called the "Gibraltar of Valencia," and locally as "The City in the Sea", is a fortified seaport, with a lighthouse, built on a rocky headland about 220 feet (67 m) high, and joined to the mainland by only a narrow strip of land (Peníscola is a local evolution of Latin peninsula). The history of the place goes back to the Iberians. Later the town became Phoenician, named Tyreche, then Greek, under the name Chersonesos (meaning "peninsula"). It was next captured by the Carthaginians under Hamilcar Barca; legend has it that this is the place where he made his son Hannibal swear an oath that he would never be a friend of Rome.
The present castle was built by the Knights Templar between 1294 and 1307. In the fourteenth century it was garrisoned by the Knights of Montesa, and in 1420 it reverted to the Crown of Aragon. From 1415 to 1423 it was the home of the schismatic Avignon pope Benedict XIII (Pedro de Luna), whose name is commemorated in the Castell del Papa Luna, the name of the medieval castle, and Bufador del Papa Luna, a curious cavern with a landward entrance through which the seawater escapes in clouds of spray.
The castle where Benedict lived from 1417 until his death in 1423 was restored, improved and new walls were added in 1960 when Anthony Mann's film El Cid was partially filmed there. The town and castle of Peníscola played the role of Valencia. The castle is now a popular tourist attraction and the beaches and surrounding area are a popular family holiday resort.
Peniscola hosts an annual comedy film festival that draws Spanish and foreign actors and filmmakers, and features screenings in historic venues. That the festival celebrates comedy is a natural fit; the city was the backdrop for Luis García Berlanga's comedic masterpiece Calabuch.