Castle (from the Latin castellum, diminutive of castra, a military camp, in turn the plural of castrum or watchpost), is a fort, a camp and the logical development of a fortified enclosure. The term is most often applied to a small self-contained fortress, usually of the Middle Ages, though traditionally in Britain it has also referred to prehistoric earthworks (e.g. Hollingbury Castle, Maiden Castle). "Castle" sometimes denotes citadels (such as the castles of Badajoz and Burgos) or small detached forts d'arrêt in modern times. In Spain, a fortified dwelling on a height for the administering authority retains its Moorish name of alcázar (see illustration, right).

A French castle is a château-fort, for in French a simple château connotes a grand country house at the center of an estate. When European castles were opened up and expanded into pleasure dwellings and power houses from the late 15th century, their "castle" designations, relics of the feudal age, often remained attached to the dwelling, resulting in many un-castlelike castles and châteaux.

Under its twofold aspect of a fortress and a residence, the medieval castle is inseparably connected with the subjects of fortification (see also siegecraft) and domestic architecture. As the size of local communities grew, it became necessary to provide both a larger and stronger fortification, which would provide for a very strong perimeter defense. Castle walls, together with lodgings (keep) suitable for a Baron, as well as lower grade housing within the walls to accommodate some of the key population of the local area, served this purpose.

Castles were also developed to defend key part of the countryside such as a mountain pass or river estuary, and often made use of the natural geography to support the defensive walls through exploitation of cliffs, rivers, hills, and the like. By their very nature they were very permanent structures and many survive through to the modern day; they are now mostly considered monuments. In addition to the castle walls, other defensive features include towers at the angular direction changes of walls, moats, drawbridges, battlements, portcullises, etc.

The traditional mechanism used to occupy a castle would normally be to lay siege whereby a surrounding army would camp out of range of attack and wait for the internees to run out of either food or water. Offensive techniques would include the use of catapults, siege engines, battering rams and later mortar and cannon.

The word "castle" (castel) was introduced into English shortly before the Norman Conquest to denote a type of fortress, then new to the country, brought in by the Norman knights whom Edward the Confessor had sent for to defend Herefordshire against the inroads of the Welsh.

Richard's castle, of which the earthworks remain and which has given its name to a parish, was erected at this period on the border of Herefordshire and Shropshire by Richard Fitz Scrob. The essential feature of this type was a circular mound of earth surrounded by a dry ditch and flattened at the top. Around the crest of its summit was placed a timber palisade. This moated mound was styled in French motte (in Latin, mota), a word still common in French place-names. It is clearly depicted at the time of the Conquest in the Bayeux Tapestry, and was then familiar on the mainland of western Europe.

The rapidity and ease with which it was possible to construct castles of this type made them characteristic of the Conquest period in England and of the Anglo-Norman settlements in Wales, Ireland and the Scottish lowlands. In later days a stone wall replaced the timber palisade and produced what is known as the shell-keep, the type met with in the extant castles of Berkeley, Alnwick and Windsor.

But the Normans introduced also two other types of castle. The one was adopted where they found a natural rock stronghold which only needed adaptation, as at Clifford, Ludlow, the Peak and Exeter, to produce a citadel; the other was a type wholly distinct, the high rectangular tower of masonry, of which the Tower of London is the best-known example, though that of Colchester was probably constructed in the 11th century also. But the latter type belongs rather to the more settled conditions of the 12th century when haste was not a necessity, and in the first half of which the fine extant keeps of Hedingham and Rochester were erected. These towers were originally surrounded by palisades, usually on earthen ramparts, which were replaced later by stone walls. The whole fortress thus formed was styled a castle, but sometimes more precisely "tower and castle," the former being the citadel, and the latter the walled enclosure, which preserved more strictly the meaning of the Roman castellum.

Reliance was placed by the engineers of that time simply and solely on the inherent strength of the structure, the walls of which defied the battering ram, and could only be undermined at the cost of much time and labour, while the narrow apertures were constructed to exclude arrows or flaming brands.

At this stage the crusades, and the consequent opportunities afforded to western engineers of studying the solid fortresses of the Byzantine empire, revolutionized the art of castlebuilding, which henceforward follows recognized principles. Many castles were built in the Holy Land by the crusaders of the 12th century, and it has been shown (Oman, Art of War: the Middle Ages, p. c20) that the designers realized, first, that a second line of defences should be built within the main enceinte, and a third line or keep inside the second line; and secondly, that a wall must be flanked by projecting towers. From the Byzantine engineers, through the crusaders, we derive, therefore, the cardinal principle of the mutual defence of all the parts of a fortress.

The donjon of western Europe was regarded as the fortress, the outer walls as accessory defences; in the East each envelope was a fortress in itself, and the keep became merely the last refuge of the garrison, used only when all else had been captured. Indeed the keep, in several crusader castles, is no more than a tower, larger than the rest, built into the enceinte and serving with the rest for its flanking defence, while the fortress was made strongest on the most exposed front. The idea of the flanking towers (which were of a type very different from the slight projections of the shell-keep and rectangular tower) soon penetrated to Europe, and Alnwick Castle (1140-1150) shows the influence of the new system.

But the finest of all castles of the middle ages was Richard de Lion's fortress of Château-Gaillard Les Andelys. Here the innermost ward was protected by an elaborate system of strong appended defences, which included a strong fte-de-pont covering the Seine bridge (see Clark, i. 384, and Oman, p. 533). The castle stood upon high ground and consisted of three distinct enceintes or wards besides the keep, which was in this case merely a strong tower forming part of the innermost ward, The donion was rarely defended ci outrance and it gradually sank in importance as the outer "wards" grew stronger. Round instead of rectangular towers were now becoming usual, the finest examples of their employment as keeps being at Conisborough in England and at Coucy in France. Against the relatively feeble siege artillery of the 13th century a well built fortress was almost proof, but the mines and the battering ram of the attack were more formidable, and it was realized that corners in the stonework of the fortress were more vulnerable than a uniform curved surface. Château Gaillard fell to Philip Augustus in 1204 after a strenuous defence, and the success of the assailants was largely due to the wise and skilful employment of mines. An angle of the noble keep of Rochester was undermined and brought down by John in 1215.

The next development was the extension of the principle of successive lines of defence to form what is called the "concentric" castle, in which each ward was placed wholly within another which enveloped it; places thus built on a flat site (e.g. Caerphilly Castle) became for the first time more formidable than strongholds perched upon rocks and hills such as Château Gaillard, where the more exposed parts indeed possessed many successive lines of defence, but at other points, for want of room, it was impossible to build more than one or, at most, two walls. In these cases, the fall of the inner ward by surprise, escalade, vive force, or even by ordinary siege (as was sometimes feasible), entailed the fall of the whole castle. The adoption of the concentric system precluded any such mischance, and thus, even though siege engines improved during the 13th and 14th centuries, the defence, by the massive strength of the concentric castle in some cases, by natural inaccessibility of position in others, maintained itself superior to the attack during the latter middle ages. Its final fall was due to the introduction of gunpowder as a propellant. In the 14th century the change begins, in the 15th it is fully developed, in the 16th the feudal fastness has become an anachronism.

The general adoption of cannon placed in the hands of the central power a force which ruined the baronial fortifications in a few days of firing. The possessors of cannon were usually private individuals of the middle classes, from whom the prince hired the matériel and the technical workmen. A typical case will be found in the history of Brandenburg and Kingdom of Prussia (Carlyle, Frederick the Great, bk. iii. ch. i.), the impregnable castle of Friesack, held by an intractable feudal noble, Dietrich von Quitzow, being reduced in two days by the elector Frederick I with "Heavy Peg" (Faule Grete) and other guns hired and borrowed (February 1414). The beginnings of orderly government in Brandenburg thus depended upon the guns, and the taking of Friesack is, in Carlyle's phrase, "a fact memorable to every Prussian man." In England, the earl of Warwick in 1464 reduced the strong fortress of Bamburgh in a week, and in Germany, Franz von Sickingen's stronghold of Landstuhl, formerly impregnable on its heights, was ruined in one day by the artillery of Philip of Hesse (1523). Very heavy artillery was used for such work, of course, and against lighter natures, some castles and even fortified country-houses or castellated mansions managed to make a stout stand even as late as the great castles erected by Henry VIII, especially those at Deal, Sandown and Walmer (c. 1540), which played some part in the events of the 17th century, and of which Walmer Castle is still the official residence of the lord warden of the Cinque Ports.

Viollet-le-Duc, in his Annals of a Fortress (English trans.), gives a full and interesting account of the repeated renovations of the fortress on his imaginary site in the valley of the Doubs, the construction by Charles the Bold of artillery towers at the angles of the castle, the protection of the masonry by earthen outworks, boulevards and demi-boulevards, and, in the 17th century, the final service of the medieval walls and towers as a pure enceinte de sfireti. Here and there we find old castles serving as forts d'arret or block-houses in mountain passes and defiles, and in some few cases, as at Dover, they formed the nucleus of purely military places of arms, but normally the castle falls into ruins, becomes a peaceful mansion, or is merged in the fortifications of the town which has grown up around it. In the Annals of a Fortress the site of the feudal castle is occupied by the citadel of the walled town, for once again, with the development of the middle class and of commerce and industry, the art of the engineer came to be displayed chiefly in the fortification of cities. The baronial "castle" assumes pan passu the form of a mansion, retaining indeed for long some capacity for defence, but in the end losing all military characteristics save a few which survived as ornaments. Examples of such castellated mansions are seen in Wingfield Manor, Derbyshire, and Hurstmonceaux, Sussex, erected in the 15th century, and nearly all older castles which survived were continually improved and altered to serve as residences.