The Castle by the Sea, from which Castellammare derives its name, rises to 100 meters altitude above sea level while behind these are the imposing domes of rock (the foothills of Mount Faito) that rise vertically up to 650 m. The Castle was built to guard the narrow stretch of coast, between the inaccessible mountain and the sea, from which the army intended to penetrate and would have been able to pass the Sorrentine Peninsula.
The name of “Castello a Mare” appears in a document for the first time in 1086 which is written proof that the Castle had already existed for some time. The Castle was built following the Byzantine style by the Duke of Sorrento, as a border fortress of his dominion. Over the centuries (from the 11th to the 15th century) it underwent various transformations, according to the evolution of different techniques of art and war. The modern aspect stems from the last transformation of 1470, aimed at strengthening the fortress against an artillery attack.
At the beginning of the 1500’s, the Castle rampart “rivellino” was added for its proximity to an external ditch full of water. The "Castrum de Stabiis ad Mare" was the foothold of a complex defensive system including amongst others, the castles of Gragnano, Lettere, and Pimonte and it had numerous defense posts deployed on the surrounding land, the most notable was erected on the shore which was connected to a walkway following the walls of the Castle that descended down to the watchtower. Similar to the New Castle (Castel Nuovo) of Naples, the Castello a Mare of Stabia is to be considered a Medieval construction, even though it was equipped for defense in the Aragonese time period: the buttresses for reinforcement of the pre-existent towers can be attributed to the XV and even to the XVI century .
In the XV century, the fortress of Castellamare was quite important for the wide range strategy and in support of the deployment of vessels and fleets at sea; in fact, it was added to the Neapolitan Chronicles from the 1400’s edited by Filangieri of Candida. The three coats of arms that Castellamare has had in the course of history, all bear the picture of the Castle. Also to be noted is the fact that the second of four cathedrals of Castellamare was situated in the domain of the fortress, where the bishops that succeeded one another, lived from the time period of 840 to 1362. At the time of the conspiracy of the Barons, the castle was handed over (October 1459), without any resistance from the Lord of the Manor, the Catalan Gaillard, to the troops of John of Anjou, son of Rene. In 1461 Gaillard himself valiantly and victoriously defended the Castle for Anjou, against Antonio Piccolomini, Duke of Amalfi, who won against the armed Angevins at the mouth of the Sarno and had occupied the city on 23rd October.
Castellammare was a fief of the Farnese family, brought in dowry by Margaret of Habsburg, the illegitimate daughter of Charles V, in 1538 to the thirteen year old Ottavio Farnese. The prison, extracted from the base of the tower, was one of the most persuasive tools of the administration of the various governors, and its name "La Papiria" emerges from the archival documents. In the seventeenth century, Castellamare was an actual city and the Castle, outdated instrument of war, was no longer used as a fortress to protect its people from danger. It was partly due to the change of political strategies in the Viceroyalty of the Crown of Spain, which aimed at political neutralization of the feudal lords, that the Castle was abandoned.
As time passed, the ruins of the fortress with the collapse of the old stones and embattlements, and with a profusion of wild flowers that grew out of the crevices of the rock, gave to the manor a romantic look which became a dominant feature of the scenery of Castellamare by the XIX century. This feature became the dominant aspect in the landscape, making the Castle a favorite subject of painters, designers and engravers, ranging from Pitloo to Duclair, from Pinelli to Gigante, from Carelli to Gaeta. The Castle, in this way, continued to live for two centures (“sub specie artis”) in the artwork of artists, especially landscape artists from the Posillipo school, who won a place for the Castle amongst the most famous landscapes depicted in art at the time. The Castle, in its moment of greatest splendor, hosted Bocaccio who described it in his Decameron on the tenth day, with its nearby Royal Palace of Casasana. Reduced to a state of ruins, with only the towers and triangular-shaped external walls standing, the internal part completely collapsed. In 1931 the Castle became private property and a restoration project began, under the direction of Prof. Guido Chierici, superintendant of Medieval and Modern Art of Campania at the time, with the aim of saving the external walls and the existent structures.
During the last war, the building was occupied by British troops and reduced to a pitiable condition. To repair the damage done during the requisition, in 1956 the castle underwent a second major restoration project that lasted 12 years. Both the reconstruction and the following restoration, as well as the timely maintenance have been made and continue to be made with great dedication and noteworthy financial sacrifice by private owners in order to uphold a building that otherwise was destined to remain in ruins.