User:Nitrobullet/sandbox


 * For a list of all castles, see List of castles. For similar but unrelated structures in Japan, see Japanese castle.



A castle (from Latin castellum) is a type of fortified structure built in Europe and the Middle East during the Middle Ages by nobility. Scholars debate the scope of the word castle, but usually consider it to be the private fortified residence of a lord or noble. This is distinct from a palace, which is not fortified; from a fortress, which was not always a residence for nobility; and from a fortified settlement, which was a public defence – though there are many similarities among these types of construction. Usage of the term has varied over time and has been applied to structures as diverse as hill forts and country houses. Over the approximately 900 years that castles were built they took on a great many forms with many different features, although some, such as curtain walls and arrowslits, were commonplace.

A European innovation, castles originated in the 9th and 10th centuries, after the fall of the Carolingian Empire resulted in its territory being divided among individual lords and princes. These nobles built castles to control the area immediately surrounding them, and were both offensive and defensive structures; they provided a base from which raids could be launched as well as protection from enemies. Although their military origins are often emphasised in castle studies, the structures also served as centres of administration and symbols of power. Urban castles were used to control the local populace and important travel routes, and rural castles were often situated near features that were integral to life in the community, such as mills and fertile land.

Many castles were originally built from earth and timber, but had their defences replaced later by stone. Early castles often exploited natural defences, and lacked features such as towers and arrowslits and relied on a central keep. In the late 12th and early 13th centuries, a scientific approach to castle defence emerged. This led to the proliferation of towers, with an emphasis on flanking fire. Many new castles were polygonal or relied on concentric defence – several stages of defence within each other that could all function at the same time to maximise the castle's firepower. These changes in defence have been attributed to a mixture of castle technology from the Crusades, such as concentric fortification, and inspiration from earlier defences such as Roman forts. Not all the elements of castle architecture were military in nature, and devices such as moats evolved from their original purpose of defence into symbols of power. Some grand castles had long winding approaches intended to impress and dominate their landscape.

Although gunpowder was introduced to Europe in the 14th century, it did not significantly affect castle building until the 15th century, when artillery became powerful enough to break through stone walls. While castles continued to be built well into the 16th century, new techniques to deal with improved cannon fire made them uncomfortable and undesirable places to live. As a result, true castles went into decline and were replaced by artillery forts with no role in civil administration, and country houses that were indefensible. From the 18th century onwards, there was a renewed interest in castles with the construction of mock castles, part of a romantic revival of Gothic architecture, but they had no military purpose.

Etymology


The word castle is derived from the Latin word castellum which is a diminutive of the word castrum, meaning "fortified place". The Old English castel, Old French castel or chastel, French château, Portuguese castelo, Spanish castillo, Italian castello, and a number of words in other languages also derive from castellum. The word castle was introduced into English shortly before the Norman Conquest to denote this type of building, which was then new to England.

Defining characteristics
In its simplest terms, the definition of a castle accepted amongst academics is "a private fortified residence". This contrasts with earlier fortifications, such as Anglo Saxon burhs and walled cities such as Constantinople and Antioch in the Middle East; castles were not communal defences but were built and owned by the local feudal lords, either for themselves or for their monarch. Feudalism was the link between a lord and his vassal where, in return for military service, the lord would grant the vassal land and expect loyalty. In the late 20th century, there was a trend to refine the definition of a castle by including the criterion of feudal ownership, thus tying castles to the medieval period, however, this does not necessarily reflect the terminology used in the medieval period. During the First Crusade (1096–1099) the Frankish armies encountered walled settlements and forts that they indiscriminately referred to as castles, but which would not be considered as such under the modern definition.

Castles served a range of purposes, the most important of which were military, administrative, and domestic. As well as defensive structures, castles were also offensive tools which could be used as a base of operations in enemy territory. Castles were established by Norman invaders of England for both defensive purposes and to pacify the country's inhabitants. As William the Conqueror advanced through England he fortified key positions to secure the land he had taken. Between 1066 and 1087 he established 36 castles such as Warwick Castle, which he used to guard against rebellion in the English Midlands.

Towards the end of the Middle Ages, castles tended to lose their military significance due to the advent of powerful cannons and permanent artillery fortifications; as a result, castles became more important as residences and statements of power. A castle could act as a stronghold and prison but was also a place where a knight or lord could entertain his peers. Over time the aesthetics of the design became more important, as the castle's appearance and size began to reflect the prestige and power of its occupant. Comfortable homes were often fashioned within their fortified walls. Although castles still provided protection from low levels of violence in later periods, eventually they were succeeded by country houses as high status residences.

Use of the term
Castle is sometimes used as a catch-all term for all kinds of fortifications, and as a result has been misapplied in the technical sense. An example of this is Maiden Castle which, despite the name, is an Iron Age hill fort, which had a very different origin and purpose. Although "castle" has not become, like chateau in French and schloss in German, a generic term for an English country house, many of these use the word in their name while having few if any of the architectural characteristics, usually as their owners liked to maintain a link to the past and felt the castle was a masculine expression of their power. In scholarship the castle, as defined above, is generally accepted as a coherent concept, originating in Europe and later spreading to parts of the Middle East, where they were introduced by European Crusaders. This coherent group shared a common origin, dealt with a particular mode of warfare, and exchanged influences.

In other areas of the world, analogous structures shared features of fortification and other defining characteristics associated with the concept of a castle, though they originated in different periods and circumstances and experienced differing evolutions and influences. For example shiro in Japan, described as castles by historian Stephen Turnbull, underwent "a completely different developmental history, were built in a completely different way and were designed to withstand attacks of a completely different nature". While European castles built from the late 12th and early 13th century onwards were generally stone, shiro were predominantly of timber construction into the 16th century.

By the time Japanese and European cultures met in the late 16th century, fortification in Europe had moved beyond castles and relied on innovations such as the Italian trace italienne and star forts. Forts in India present a similar case; when they were encountered by the British in the 17th century castles in Europe had generally fallen out of use militarily. The fortifications the British encountered were dubbed forts, and the terminology is widely used today. Like shiro, the Indian forts, durga or durg in Sanskrit, shared features with castles in Europe such as acting as a domicile for a lord as well as being fortifications. They too had a different development from the structures known as castles that had their origins in Europe.

Motte
A motte was an earthen mound with a flat top. It was often artificial, although sometimes it incorporated a pre-existing feature of the landscape. The excavation of earth to make the mound left a ditch around the motte which acted as a further defence. Sometimes a nearby stream was diverted to flood the ditch, creating a moat. "Motte" and "moat" derive from the same Old French word, indicating that the features were originally associated and depended on each other for their construction. Although the motte is commonly associated with the bailey to form a motte-and-bailey castle, this was not always the case and there are instances where a motte existed on its own. "Motte" refers to the mound alone, but it was often surmounted by a fortified structure, such as a keep, and the flat top would be surrounded by a palisade. It was common for the motte to be accessed via a flying bridge (a bridge over the ditch from the counterscarp of the ditch to the edge of the top of the mound), as shown in the Bayeux Tapestry's depiction of Château de Dinan. Sometimes a motte covered an older castle or hall, whose rooms became underground storage areas and prisons beneath a new keep.

Bailey and enceinte
A bailey, also called a ward, was a fortified enclosure. It was a common feature of castles, and most had at least one. The keep on top of the motte was the domicile of the lord in charge of the castle and a bastion of last defence, while the bailey was the home of the rest of the lord's household and gave them protection. The barracks for the garrison, stables, workshops, and storage facilities were often found in the bailey. Water was supplied by a well or cistern. Over time the focus of high status accommodation shifted from the keep to the bailey; this resulted in the creation of another bailey that separated the high status buildings – such as the lord's chambers and the chapel – from the everyday structures such as the workshops and barracks.

From the late 12th century there was a trend for knights to move out of the small houses they had previously occupied within the bailey to live in fortified houses in the countryside. Although often associated with the motte-and-bailey type of castle, baileys could also be found as independent defensive structures. These simple fortifications were called ringworks. The enceinte was the castle's main defensive enclosure, and the terms "bailey" and "enceinte" are linked. A castle could have several baileys but only one enceinte. Castles with no keep, which relied on their outer defences for protection, are sometimes called enceinte castles; these were the earliest form of castles, before the keep was introduced in the 10th century.

Keep
A keep was a great tower and usually the most strongly defended point of a castle before the introduction of concentric defence. "Keep" was not a term used in the medieval period – the term was applied from the 16th century onwards – instead "donjon" was used to refer to great towers, or turris in Latin. In motte-and-bailey castles, the keep was on top of the motte. "Dungeon" is a corrupted form of "donjon" and means a dark, unwelcoming prison. Although often the strongest part of a castle and a last place of refuge if the outer defences fell, the keep was not left empty in case of attack but was used as a residence by the lord who owned the castle, or his guests or representatives.

At first this was usual only in England, when after the Norman Conquest of 1066 the "conquerors lived for a long time in a constant state of alert"; elsewhere the lord's wife presided over a separate residence (domus, aula or mansio in Latin) close to the keep, and the donjon was a barracks and headquarters. Gradually, the two functions merged into the same building, and the highest residential storeys had large windows; as a result for many structures, it is difficult to find an appropriate term. The massive internal spaces seen in many surviving donjons can be misleading; they would have been divided into several rooms by light partitions, as in a modern office building. Even in some large castles the great hall was separated only by a partition from the lord's "chamber", his bedroom and to some extent his office.

Curtain wall
Curtain walls were defensive walls enclosing a bailey. They had to be high enough to make scaling the walls with ladders difficult and thick enough to withstand bombardment from siege engines which, from the 15th century onwards, included artillery. A typical wall could be 3 m thick and 12 m tall, although sizes varied greatly between castles. To protect them from undermining, curtain walls were sometimes given a stone skirt around their bases. Walkways along the tops of the curtain walls allowed defenders to rain missiles on enemies below, and battlements gave them further protection. Curtain walls were studded with towers to allow enfilading fire along the wall. Arrowslits in the walls did not become common in Europe until the 13th century, for fear that they might compromise the wall's strength.

Gatehouse
The entrance was often the weakest part in a circuit of defences. To overcome this, the gatehouse was developed, allowing those inside the castle to control the flow of traffic. In earth and timber castles, the gateway was usually the first feature to be rebuilt in stone. The front of the gateway was a blind spot and to overcome this, projecting towers were added on each side of the gate in a style similar to that developed by the Romans. The gatehouse contained a series of defences to make a direct assault more difficult than battering down a simple gate. Typically, there were one or more portcullises – a wooden grille reinforced with metal to block a passage – and arrowslits to allow defenders to harry the enemy. The passage through the gatehouse was lengthened to increase the amount of time an assailant had to spend under fire and unable to retaliate in a confined space.

It is a popular myth that so-called murder-holes – openings in the ceiling of the gateway passage – were used to pour boiling oil or molten lead on attackers; the price of oil and lead and the distance of the gatehouse from fires meant that this was completely impractical. They were most likely used like machicolations, to drop objects on attackers, or to allow water to be poured on fires to extinguish them. Provision was made in the upper storey of the gatehouse for accommodation so the gate was never left undefended, although this arrangement later evolved to become more comfortable at the expense of defence.

During the 13th and 14th centuries the barbican was developed. This consisted of a rampart, ditch and possibly a tower, in front of the gatehouse which could be used to further protect the entrance. The purpose of a barbican was not just to provide another line of defence but also to dictate the only approach to the gate.

Moat
A moat was a defensive ditch with steep sides, and could be either dry or filled with water. Its purpose was twofold; to stop devices such as siege towers from reaching the curtain wall and to prevent the walls from being undermined. Water moats were found in low-lying areas and were usually crossed by a drawbridge, although these were often replaced by stone bridges. Fortified islands could be added to the moat, adding another layer of defence. Water defences, such as moats or natural lakes, had the benefit of dictating the enemy's approach to the castle. The site of the 13th-century Caerphilly Castle in Wales covers over 30 acre and the water defences, created by flooding the valley to the south of the castle, are some of the largest in Western Europe.

Other features
Battlements were most often found surmounting curtain walls and the tops of gatehouses, and comprised several elements: crenellations, hoardings, machicolations, and loopholes. Crenellation is the collective name for alternating crenels and merlons: gaps and solid blocks on top of a wall. Hoardings were wooden constructs that projected beyond the wall, allowing defenders to shoot at, or drop objects on attackers at the base of the wall without having to lean perilously over the crenellations, thereby exposing themselves to retaliatory fire. Machicolations were stone projections on top of a wall with openings that allowed objects to be dropped on an enemy at the base of the wall in a similar fashion to hoardings.

Arrowslits, also commonly called loopholes, were narrow vertical openings in defensive walls which allowed arrows or crossbow bolts to be fired on attackers. The narrow slits were intended to protect the defender by providing a very small target, but the size of the opening could also impede the defender if it was too small. A smaller horizontal opening could be added to give an archer a better view for aiming. Sometimes a sally port was included; this could allow the garrison to leave the castle and engage besieging forces. It was usual for the latrines to empty down the external walls of a castle and into the surrounding ditch.

Antecedents
According to historian Charles Coulson the accumulation of wealth and resources, such as food, led to the need for defensive structures. The earliest fortifications originated in the Fertile Crescent, the Indus Valley, Egypt, and China where settlements were protected by large walls. Northern Europe was slower than the East to develop defensive structures and it was not until the Bronze Age that hill forts developed. They proliferated across Europe in the Iron Age. These structures differed from their eastern counterparts in that they used earthworks rather than stone as a building material.

Oppida developed in Europe from hill forts in the 2nd century BC; they were fortified settlements, such as the oppidum of Manching. The Romans encountered fortified settlements such as hill forts and oppida when expanding their territory into northern Europe. The defences were often effective and only overcome by the extensive use of siege engines and other siege warfare techniques, such as at the Battle of Alesia. The Romans' own fortifications (castra) varied from simple temporary earthworks thrown up by armies on the move, to elaborate permanent stone constructions, notably the milecastles of Hadrian's Wall. Roman forts were generally rectangular with rounded corners – a "playing-card shape".

Origins and early castles
The 9th and 10th centuries saw the emergence of a social and military elite in the Carolingian Empire that was based upon mounted warfare. In return for military service knights were granted land by the lords for whom they fought. The link between knight and lord was the basis of feudalism, and could go higher up the social scale with loyalties between lords, dukes, princes, and kings. When the Carolingian Empire collapsed in the 9th and 10th centuries, so did effective centralised administration, and it fell to the landed elite to take control. This led to the privatisation of government, and local lords assumed responsibility for the economy and justice. It was in this context that castles originated. Although castles were private buildings, lordship was a public office and the holder had a responsibility to protect his peasants.

Allen Brown asserts that the breakdown of society associated with the decline of the Carolingian Empire and the subsequent absence of a working state made feudal ties more important. The rise of castles is not solely attributed to defence of the new feudal lords' lands, but as a reaction to attacks by Magyars, Muslims, and Vikings. It is likely that the castle evolved from the practice of fortifying a lordly home. The greatest threat to a lord's home or hall was fire as it was usually a wooden structure. To protect against this, and keep other threats at bay, there were several courses of action available: create encircling earthworks to keep an enemy at a distance; build the hall in stone; or raise it up on an artificial mound, known as a motte, to present an obstacle to attackers. While the concept of ditches, ramparts, and stone walls as defensive measures is ancient, raising a motte is a medieval innovation.

A bank and ditch enclosure was a simple form of defence, and when found without an associated motte is called a ringwork; when the site was in use for a prolonged period, it was sometimes replaced by a more complex structure or enhanced by the addition of a stone curtain wall. Building the hall in stone did not necessarily make it immune to fire as it still had windows and a wooden door. This led to the elevation of windows to the first floor – to make it harder to throw objects in – and to change the entrance from ground floor to first floor. These features are seen in many surviving castle keeps, which were the more sophisticated version of halls. Castles were not just defensive sites but also enhanced a lord's control over his lands. They allowed the garrison to control the surrounding area, and formed a centre of administration, providing the lord with a place to hold court.



Building a castle sometimes required the permission of the king or other high authority. In 864 the King of West Francia, Charles the Bald, prohibited the construction of castella without his permission and ordered them all to be destroyed. This is perhaps the earliest reference to castles being built without permission, breaking the feudal agreement between lord and vassal. However, military historian Allen Brown points out that the wording may be misleading as at the time terms such as castellum and castrum were used to describe any fortification.

In some countries the monarch had little control over lords, or required the construction of new castles to aid in securing the land so was unconcerned about granting permission – as was the case in England in the aftermath of the Norman Conquest and the Holy Land during the Crusades. Switzerland is an extreme case of there being no state control over who built castles, and as a result there were 4,000 in the country. There are very few castles dated with certainty from the mid-9th century. Converted into a donjon around 950, Château de Doué-la-Fontaine in France is the oldest standing castle in Europe.

From 1000 onwards, references to castles in texts such as charters increased greatly. Historians have interpreted this as evidence of a sudden increase in the number of castles in Europe around this time; this has been supported by archaeological investigation which has dated the construction of castle sites through the examination of ceramics. The increase in Italy began in the 950s, with numbers of castles increasing by a factor of three to five every 50 years, whereas in other parts of Europe such as France and Spain the growth was slower. In 950 Provence was home to 12 castles, by 1000 this figure had risen to 30, and by 1030 it was over 100. Although the increase was slower in Spain, the 1020s saw a particular growth in the number of castles in the region, particularly in contested border areas between Christian and Muslim.

Despite the common period in which castles rose to prominence in Europe, their form and design varied from region to region. In the early 11th century, the motte and keep – an artificial mound surmounted by a palisade and tower – was the most common form of castle in Europe, everywhere except Scandinavia. While Britain, France, and Italy shared a tradition of timber construction that was continued in castle architecture, Spain more commonly used stone or mud-brick as the main building material. The Muslim invasion of the Iberian Peninsula in the 8th century introduced a style of building developed in North Africa reliant on tapial, pebbles in cement, where timber was in short supply. Although stone construction would later become common elsewhere, from the 11th century onwards it was the primary building material for Christian castles in Spain, while at the same time timber was still the dominant building material in north-west Europe.



Historians have interpreted the widespread presence of castles across Europe in the 11th and 12th centuries as evidence that warfare was common, and usually between local lords. Castles were introduced into England shortly before the Norman Conquest in 1066. Before the 12th century, castles were as uncommon in Denmark as they had been in England before the Norman Conquest. The introduction of castles to Denmark was a reaction to attacks from Wendish pirates, and they were usually intended as coastal defences. The motte and bailey remained the dominant form of castle in England, Wales, and Ireland well into the 12th century. At the same time, castle architecture in mainland Europe became more sophisticated.

The donjon was at the centre of this change in castle architecture in the 12th century. Central towers proliferated, and typically had a square plan, with walls 3 to 4 m thick. Their decoration emulated Romanesque architecture, and sometimes incorporated double windows similar to those found in church bell towers. Donjons, which were the residence of the lord of the castle, evolved to become more spacious. The design emphasis of donjons changed to reflect a shift from functional to decorative requirements, imposing a symbol of lordly power upon the landscape. This sometimes led to compromising defence for the sake of display.

Innovation and scientific design
Until the 12th century, stone-built and earth and timber castles were contemporary, but by the late 12th century the number of castles being built went into decline. This has been partly attributed to the higher cost of stone-built fortifications, and the obsolescence of timber and earthwork sites, which meant it was preferable to build in more durable stone. Although superseded by their stone successors, timber and earthwork castles were by no means useless. This is evidenced by the continual maintenance of timber castles over long periods, sometimes several centuries; Owain Glyndŵr's 11th-century timber castle at Sycharth was still in use by the start of the 15th century, its structure having been maintained for four centuries.

At the same time there was a change in castle architecture. Until the late 12th century castles generally had few towers; a gateway with few defensive features such as arrowslits or a portcullis; a great keep or donjon, usually square and without arrowslits; and the shape would have been dictated by the lay of the land (the result was often irregular or curvilinear structures). The design of castles was not uniform, but these were features that could be found in a typical castle in the mid-12th century. By the end of the 12th century or the early 13th century, a newly constructed castle could be expected to be polygonal in shape, with towers at the corners to provide enfilading fire for the walls. The towers would have protruded from the walls and featured arrowslits on each level to allow archers to target anyone nearing or at the curtain wall. These later castles did not always have a keep, but this may have been because the more complex design of the castle as a whole drove up costs and the keep was sacrificed to save money. The larger towers provided space for habitation to make up for the loss of the donjon. Where keeps did exist, they were no longer square but polygonal or cylindrical. Gateways were more strongly defended, with the entrance to the castle usually between two half-round towers which were connected by a passage above the gateway – although there was great variety in the styles of gateway and entrances – and one or more portcullis. A peculiar feature of Muslim castles in the Iberian Peninsula was the use of detached towers, called Albarrana towers, around the perimeter as can be seen at the Alcazaba of Badajoz. Probably developed in the 12th century, the towers provided flanking fire. They were connected to the castle by removable wooden bridges, so if the towers were captured the rest of the castle was not accessible.

When seeking to explain this change in the complexity and style of castles, antiquarians found their answer in the Crusades. It seemed that the Crusaders had learned much about fortification from their conflicts with the Saracens and exposure to Byzantine architecture. There were legends such as that of Lalys – an architect from Palestine who reputedly went to Wales after the Crusades and greatly enhanced the castles in the south of the country – and it was assumed that great architects such as James of Saint George originated in the East. In the mid-20th century this view was cast into doubt. Legends were discredited, and in the case of James of Saint George it was proven that he came from Saint-Georges-d'Espéranche, in France. If the innovations in fortification had derived from the East, it would have been expected for their influence to be seen from 1100 onwards, immediately after the Christians were victorious in the First Crusade (1096–1099), rather than nearly 100 years later. Remains of Roman structures in Western Europe were still standing in many places, some of which had flanking round-towers and entrances between two flanking towers. The castle builders of Western Europe were aware of and influenced by Roman design; late Roman coastal forts on the English "Saxon Shore" were reused and in Spain the wall around the city of Ávila imitated Roman architecture when it was built in 1091. Historian Smail in Crusading warfare argued that the case for the influence of Eastern fortification on the West has been overstated, and that Crusaders of the 12th century in fact learned very little about scientific design from Byzantine and Saracen defences. A well-sited castle that made use of natural defences and had strong ditches and walls had no need for a scientific design. An example of this approach is Kerak. Although there were no scientific elements to its design, it was almost impregnable, and in 1187 Saladin chose to lay siege to the castle and starve out its garrison rather than risk an assault.

After the First Crusade, Crusaders who did not return to their homes in Europe helped found the Crusader states of the principality of Antioch, the County of Edessa, the Kingdom of Jerusalem, and the County of Tripoli. The castles they founded to secure their acquisitions were designed mostly by Syrian master-masons. Their design was very similar to that of a Roman fort or Byzantine tetrapyrgia which were square in plan and had square towers at each corner that did not project much beyond the curtain wall. The keep of these Crusader castles would have had a square plan and generally be undecorated. While castles were used to hold a site and control movement of armies, in the Holy Land some key strategic positions were left unfortified. Castle architecture in the East became more complex around the late 12th and early 13th centuries after the stalemate of the Third Crusade (1189–1192). Both Christians and Muslims created fortifications, and the character of each was different. Saphadin, the 13th-century ruler of the Saracens, created structures with large rectangular towers that influenced Muslim architecture and were copied again and again, however they had little influence on Crusader castles.

In the early 13th century, Crusader castles were mostly built by Military Orders including the Knights Hospitaller, Knights Templar, and Teutonic Knights. The orders were responsible for the foundation of sites such as Krak des Chevaliers, Margat, and Belvoir. Design varied not just between orders, but between individual castles, though it was common for those founded in this period to have concentric defences. The concept, which originated in castles such as Krak des Chevaliers, was to remove the reliance on a central strongpoint and to emphasise the defence of the curtain walls. There would be multiple rings of defensive walls, one inside the other, with the inner ring rising above the outer so that its field of fire was not completely obscured. If assailants made it past the first line of defence they would be caught in the killing ground between the inner and outer walls and have to assault the second wall. Concentric castles were widely copied across Europe, for instance when Edward I of England – who had himself been on Crusade – built castles in Wales in the late 13th century, four of the eight he founded had a concentric design. Not all the features of the Crusader castles from the 13th century were emulated in Europe. For instance, it was common in Crusader castles to have the main gate in the side of a tower and for there to be two turns in the passageway, lengthening the time it took for someone to reach the outer enclosure. It is rare for this bent entrance to be found in Europe.

One of the effects of the Livonian Crusade in the Baltic was the introduction of stone and brick fortifications. Although there were hundreds of wooden castles in Prussia and Livonia, the use of bricks and mortar was unknown in the region before the Crusaders. Until the 13th century and start of the 14th centuries, their design was heterogeneous, however this period saw the emergence of a standard plan in the region: a square plan, with four wings around a central courtyard. It was common for castles in the East to have arrowslits in the curtain wall at multiple levels; contemporary builders in Europe were wary of this as they believed it weakened the wall. Arrowslits did not compromise the wall's strength, but it was not until Edward I's programme of castle building that they were widely adopted in Europe. The Crusades also led to the introduction of machicolations into Western architecture. Until the 13th century, the tops of towers had been surrounded by wooden galleries, allowing defenders to drop objects on assailants below. Although machicolations performed the same purpose as the wooden galleries, they were probably an Eastern invention rather than an evolution of the wooden form. Machicolations were used in the East long before the arrival of the Crusaders, and perhaps as early as the first half of the 8th century in Syria. The greatest period of castle building in Spain was in the 11th to 13th centuries, and they were most commonly found in the disputed borders between Christian and Muslim lands. Conflict and interaction between the two groups led to an exchange of architectural ideas, and Spanish Christians adopted the use of detached towers. The Spanish Reconquista, driving the Muslims out of the Iberian Peninsula, was complete in 1492.

Although France has been described as "the heartland of medieval architecture", the English were at the forefront of castle architecture in the 12th century. French historian François Gebelin wrote: "The great revival in military architecture was led, as one would naturally expect, by the powerful kings and princes of the time; by the sons of William the Conqueror and their descendants, the Plantagenets, when they became dukes of Normandy. These were the men who built all the most typical twelfth-century fortified castles remaining to-day". Despite this, by the beginning of the 15th century, the rate of castle construction in England and Wales went into decline. The new castles were generally of a lighter build than earlier structures and presented few innovations, although strong sites were still created such as that of Raglan in Wales. At the same time, French castle architecture came to the fore and led the way in the field of medieval fortifications. Across Europe – particularly the Baltic, Germany, and Scotland – castles were built well into the 16th century.

Advent of gunpowder
Artillery powered by gunpowder was introduced to Europe in the 1320s and spread quickly. Handguns, which were initially unpredictable and inaccurate weapons, were not recorded until the 1380s. Castles were adapted to allow small artillery pieces – averaging between 19.6 and 22 kg – to fire from towers. These guns were too heavy for a man to carry and fire, but if he supported the butt end and rested the muzzle on the edge of the gun port he could fire the weapon. The gun ports developed in this period show a unique feature, that of a horizontal timber across the opening. A hook on the end of the gun could be latched over the timber so the gunner did not have to take the full recoil of the weapon. This adaptation is found across Europe, and although the timber rarely survives, there is an intact example at Castle Doornenburg in the Netherlands. Gunports were keyhole shaped, with a circular hole at the bottom for the weapon and a narrow slit on top to allow the gunner to aim. This form is very common in castles adapted for guns, found in Egypt, Italy, Scotland, and Spain, and elsewhere in between. Other types of port, though less common, were horizontal slits – allowing only lateral movement – and large square openings, which allowed greater movement. The use of guns for defence gave rise to artillery castles, such as that of Château de Ham in France. Defences against guns were not developed until a later stage. Ham is an example of the trend for new castles to dispense with earlier features such as machicolations, tall towers, and crenellations.

Bigger guns were developed, and in the 15th century became an alternative to siege engines such as the trebuchet. The benefits of large guns over trebuchets – the most effective siege engine of the Middle Ages before the advent of gunpowder – were those of a greater range and power. In an effort to make them more effective, guns were made ever bigger, although this hampered their ability to reach remote castles. By the 1450s guns were the preferred siege weapon, and their effectiveness was demonstrated by Mehmed II at the Fall of Constantinople. The response towards more effective cannons was to build thicker walls and to prefer round towers, as the curving sides were more likely to deflect a shot than a flat surface. While this sufficed for new castles, pre-existing structures had to find a way to cope with being battered by cannon. An earthen bank could be piled behind a castle's curtain wall to absorb some of the shock of impact. Often, castles constructed before the age of gunpowder were incapable of using guns as their wall-walks were too narrow. A solution to this was to pull down the top of a tower and to fill the lower part with the rubble to provide a surface for the guns to fire from. Lowering the defences in this way had the effect of making them easier to scale with ladders. A more popular alternative defence, which avoided damaging the castle, was to establish bulwarks beyond the castle's defences. These could be built from earth or stone and were used to mount weapons.

Around 1500, the innovation of the angled bastion was developed in Italy. With developments such as these, Italy pioneered permanent artillery fortifications, which took over from the defensive role of castles. From this evolved star forts, also known as trace italienne. The elite responsible for castle construction had to choose between the new type that could withstand cannon-fire and the earlier, more elaborate style. The first was ugly and uncomfortable and the latter was less secure, although it did offer greater aesthetic appeal and value as a status symbol. The second choice proved to be more popular as it became apparent that there was little point in trying to make the site genuinely defensible in the face of cannon. For a variety of reasons, not least of which is that many castles have no recorded history, there is no firm number of castles built in the medieval period. However, it has been estimated that between 75,000 and 100,000 were built in western Europe; of these around 1,700 were in England and Wales and around 14,000 in German-speaking areas.

Some true castles were built in the Americas by the Spanish and French colonies. The first stage of Spanish fort construction has been termed the "castle period", which lasted from 1492 until the end of the 16th century. Starting with Fortaleza Ozama, "these castles were essentially European medieval castles transposed to America". Among other defensive structures (including forts and citadels), castles were also built in New France towards the end of the 17th century. In Montreal the artillery was not as developed as on the battle-fields of Europe, some of the region's outlying forts were built like the fortified manor houses of France. Fort Longueuil, built from 1695–1698 by a baronial family, has been described as "the most medieval-looking fort built in Canada". The manor house and stables were within a fortified bailey, with a tall round turret in each corner. The "most substantial castle-like fort" near Montréal was Fort Senneville, built in 1692 with square towers connected by thick stone walls, as well as a fortified windmill. Stone forts such as these served as defensive residences, as well as imposing structures to prevent Iroquois incursions.

Although castle construction faded towards the 16th century, castles did not necessarily all fall out of use. Some retained a role in local administration and became law courts, while others are still handed down in aristocratic families as hereditary seats. A particularly famous example of this is Windsor Castle in England which was founded in the 11th century and is home to the monarch of the United Kingdom. In other cases they still had a role in defence. Tower houses, which are closely related to castles and include pele towers, were defended towers that were permanent residences built in the 14th to 17th centuries. Especially common in Ireland and Scotland, they could be up to five storeys high and succeeded common enclosure castles and were built by a greater social range of people. While unlikely to provide as much protection as a more complex castle, they offered security against raiders and other small threats.

Later use and revival castles
According to archaeologists Oliver Creighton and Robert Higham, "the great country houses of the seventeenth to twentieth centuries were, in a social sense, the castles of their day". Though there was a trend for the elite to move from castles into country houses in the 17th century, castles were not completely useless. In later conflicts, such as the English Civil War (1641–1651), many castles were refortified, although subsequently slighted to prevent them from being used again.

Revival or mock castles became popular as a manifestation of a Romantic interest in the Middle Ages and chivalry, and as part of the broader Gothic Revival in architecture. Examples of these castles include Chapultepec in Mexico, Neuschwanstein in Germany, and Edwin Lutyens' Castle Drogo (1911–1930) – the last flicker of this movement in the British Isles. While churches and cathedrals in a Gothic style could faithfully imitate medieval examples, new country houses built in a "castle style" differed internally to their medieval predecessors. This was because to be faithful to medieval design would have left the houses cold and dark by contemporary standards.

Artificial ruins, built to resemble remnants of historic edifices, were also a hallmark of the period. They were usually built as centre pieces in aristocratic planned landscapes. Follies were similar, although they differed from artificial ruins in that they were not part of a planned landscape, but rather seemed to have no reason for being built. Both drew on elements of castle architecture such as castellation and towers, but served no military purpose and were solely for display.

Construction
Once the site of a castle had been selected – whether a strategic position or one intended to dominate the landscape as a mark of power – the building material had to be selected. An earth and timber castle was cheaper and easier to erect than one built from stone. The costs involved in construction are not well-recorded, and most surviving records relate to royal castles. A castle with earthen ramparts, a motte, and timber defences and buildings could have been constructed by an unskilled workforce. The source of man-power was probably from the local lordship, and the tenants would already have the necessary skills of felling trees, digging, and working timber necessary for an earth and timber castle. Possibly coerced into working for their lord, the construction of an earth and timber castle would not have been a drain on a client's funds. In terms of time, it has been estimated that an average sized motte – 5 m high and 15 m wide at the summit – would have taken 50 people about 40 working days. An exceptionally expensive motte and bailey was that of Clones in Ireland, built in 1211 for £20. The high cost, relative to other castles of its type, was because labourers had to be imported.

The cost of building a castle varied according to factors such as their complexity and transport costs for material. It is certain that stone castles cost a great deal more than those built from earth and timber. Even a very small tower, such as Peveril Castle, would have cost around £200. In the middle were castles such as Orford, which was built in the late 12th century for £1,400, and at the upper end were those such as Dover, which cost about £7,000 between 1181 and 1191. Spending on the scale of the vast castles such as Château Gaillard (an estimated £15,000 to £20,000 between 1196 and 1198) was easily supported by The Crown, but for lords of smaller areas, castle building was a very serious and costly undertaking. It was usual for a stone castle to take the best part of a decade to finish. The cost of a large castle built over this time (anywhere from £1,000 to £10,000) would take the income from several manors, severely impacting a lord's finances. Costs in the late 13th century were of a similar order, with castles such as Beaumaris and Rhuddlan costing £14,500 and £9,000 respectively. Edward I's campaign of castle-building in Wales cost £80,000 between 1277 and 1304, and £95,000 between 1277 and 1329. Renowned designer Master James of Saint George, responsible for the construction of Beaumaris, explained the cost:

"In case you should wonder where so much money could go in a week, we would have you know that we have needed – and shall continue to need 400 masons, both cutters and layers, together with 2,000 less skilled workmen, 100 carts, 60 wagons and 30 boats bringing stone and sea coal; 200 quarrymen; 30 smiths; and carpenters for putting in the joists and floor boards and other necessary jobs. All this takes no account of the garrison ... nor of purchases of material. Of which there will have to be a great quantity ... The men's pay has been and still is very much in arrears, and we are having the greatest difficulty in keeping them because they have simply nothing to live on."

Not only were stone castles expensive to build in the first place, but their maintenance was a constant drain. They contained a lot of timber, which was often unseasoned and as a result needed careful upkeep. For example, it is documented that in the late 12th century repairs at castles such as Exeter and Gloucester cost between £20 and £50 annually.

Medieval machines and inventions, such as the treadwheel crane, became indispensable during construction, and techniques of building wooden scaffolding were improved upon from Antiquity. When building in stone a prominent concern of medieval builders was to have quarries close at hand. There are examples of some castles where stone was quarried on site, such as Chinon, Château de Coucy and Château Gaillard. When it was built in 992 in France the stone tower at Château de Langeais was 16 m high, 17.5 m wide, and 10 m long with walls averaging 1.5 m. The walls contain 1200 m3 of stone and have a total surface (both inside and out) of 1600 m2. The tower is estimated to have taken 83,000 average working days to complete, most of which was unskilled labour.

Many countries had both timber and stone castles, however Denmark had few quarries, and as a result, most of its castles are earth and timber affairs, or later on built from brick. Brick-built structures were not necessarily weaker than their stone-built counterparts. Brick castles are less common in England than stone or earth and timber constructions, and often it was chosen for its aesthetic appeal or because it was fashionable, encouraged by the brick architecture of the Low Countries. For example, when Tattershall Castle was built between 1430 and 1450, there was plenty of stone available nearby, but the owner, Lord Cromwell, chose to use brick. About 700,000 bricks were used to build the castle, which has been described as "the finest piece of medieval brick-work in England". Most Spanish castles were built from stone, whereas castles in Eastern Europe were usually of timber construction.

Social centre
Due to the lord's presence in a castle, it was a centre of administration from where he controlled his lands. He relied on the support of those below him, as without the support of his more powerful tenants a lord could expect his power to be undermined. Successful lords regularly held court with those immediately below them on the social scale, but absentees could expect to find their influence weakened. Larger lordships could be vast, and it would be impractical for a lord to visit all his properties regularly so deputies were appointed. This especially applied to royalty, who sometimes owned land in different countries.

To allow the lord to concentrate on his duties regarding administration, he had a household of servants to take care of chores such as providing food. The household was run by a chamberlain, while a treasurer took care of the estate's written records. Royal households took essentially the same form as baronial households, although on a much larger scale and the positions were more prestigious. An important role of the household servants was the preparation of food; the castle kitchens would have been a busy place when the castle was occupied, called on to provide large meals. Without the presence of a lord's household, usually because he was staying elsewhere, a castle would have been a quiet place with few residents, focused on maintaining the castle.

As social centres castles were important places for display. Builders took the opportunity to draw on symbolism, through the use of motifs, to evoke a sense of chivalry that was aspired to in the Middle Ages amongst the elite. Later structures of the Romantic Revival would draw on elements of castle architecture such as battlements for the same purpose. Castles have been compared with cathedrals as objects of architectural pride, and some castles incorporated gardens as ornamental features. The right to crenellate, when granted by a monarch – though it was not always necessary – was important not just as it allowed a lord to defend his property but because crenellations and other accoutrements associated with castles were prestigious through their use by the elite. Licences to crenellate were also proof of a relationship with or favour from the monarch, who was the one responsible for granting permission.

Courtly love was the eroticisation of love between the nobility. Emphasis was placed on restraint between lovers. Though sometimes expressed through chivalric events such as tournaments, where knights would fight wearing a token from their lady, it could also be private and conducted in secret. The legend of Tristan and Iseult is one example of stories of courtly love told in the Middle Ages. It was an ideal of love between two people not married to each other, although the man might be married to someone else. It was not uncommon or ignoble for a lord to be adulterous – Henry I of England had over 20 bastards for instance – but for a lady to be promiscuous was seen as dishonourable.

The purpose of marriage between the medieval elites was to secure land. Girls were married in their teens, but boys did not marry until they came of age. There is a popular conception that women played a peripheral role in the medieval castle household, and that it was dominated by the lord himself. This derives from the image of the castle as a martial institution, but most castles in England, France, Ireland, and Scotland were never involved in conflicts or sieges, so the domestic life is a neglected facet. The lady was given a "marriage portion" of her husband's estates – usually about a third – which was hers for life, and her husband would inherit on her death. It was her duty to administer them directly, as the lord administered his own land. Despite generally being excluded from military service, a woman could be in charge of a castle, either on behalf of her husband or if she was widowed. Because of their influence within the medieval household, women influenced construction and design, sometimes through direct patronage; historian Charles Coulson emphasises the role of women in applying "a refined aristocratic taste" to castles due to their long term residence.

Location and landscape
The positioning of castles was influenced by the available terrain. Whereas hill castles such as Marksburg were common in Germany, where 66 per cent of all known medieval were highland area while 34 per cent were on low-lying land, they formed a minority of sites in England. Because of the range of functions they had to fulfil, castles were built in a variety of locations. Multiple factors were considered when choosing a site, balancing between the need for a defendable position with other considerations such as proximity to resources. For instance many castles are located near Roman roads, which remained important transport routes in the Middle Ages, or could lead to the alteration or creation of new road systems in the area. Where available it was common to exploit pre-existing defences such as building with a Roman fort or the ramparts of an Iron Age hillfort. A prominent site that overlooked the surrounding area and offered some natural defences may also have been chosen because its visibility made it a symbol of power. Urban castles were particularly important in controlling centres of population and production, especially with an invading force, for instance in the aftermath of the Norman Conquest of England in the 11th century the majority of royal castles were built in or near towns.

As castles were not simply military buildings but centres of administration and symbols of power, they had a significant impact on the landscape around them. Rural castles were often associated with mills and field systems due to their role in managing the lord's estate, which gave them greater influence over resources. Others were adjacent to or in royal forests or deer parks and were important in their upkeep. Fish ponds were a luxury of the lordly elite, and many were found next to castles. Not only were they practical in that they ensured a water supply and fresh fish, but they were a status symbol as they were expensive to build and maintain.

Although sometimes the construction of a castle led to the destruction of a village, such as at Eaton Socon in England, it was more common for the villages nearby to have grown as a result of the presence of a castle. Sometimes planned towns or villages were created around a castle. The benefits of castle building on settlements was not confined to Europe. When the 13th-century Safad Castle was founded in Galilee in the Holy Land, the 260 villages benefitted from the inhabitants' newfound ability to move freely. When built, a castle could result in the restructuring of the local landscape, with roads moved for the convenience of the lord. Settlements could also grow naturally around a castle, rather than being planned, due to the benefits of proximity to an economic centre in a rural landscape and the safety given by the defences. Not all such settlements survived, as once the castle lost its importance – perhaps succeeded by a manor house as the centre of administration – the benefits of living next to a castle vanished and the settlement depopulated.

During and shortly after the Norman Conquest of England, castles were inserted into important pre-existing towns to control and subdue the populace. They were usually located near any existing town defences, such as Roman walls, although this sometimes resulted in the demolition of structures occupying the desired site. In Lincoln, 166 houses were destroyed to clear space for the castle, and in York agricultural land was flooded to create a moat for the castle. As the military importance of urban castles waned from their early origins, they became more important as centres of administration, and their financial and judicial roles. When the Normans invaded Ireland, Scotland, and Wales in the 11th and 12th centuries, settlement in those countries was predominantly non-urban, and the foundation of towns was often linked with the creation of a castle.

The location of castles in relation to high status features, such as fish ponds, was a statement of power and control of resources. Also often found near a castle, sometimes within its defences, was the parish church. This signified a close relationship between feudal lords and the Church, one of the most important institutions of medieval society. Even elements of castle architecture that have usually been interpreted as military could be used for display. The water features of Kenilworth Castle in England – comprising a moat and several satellite ponds – forced anyone approaching the castle entrance to take a very indirect route, walking around the defences before the final approach towards the gateway. Another example is that of the 14th-century Bodiam Castle, also in England; although it appears to be a state of the art, advanced castle it is in a site of little strategic importance, and the moat was shallow and more likely intended to make the site appear impressive than as a defence against mining. The approach was long and took the viewer around the castle, ensuring they got a good look before entering. Moreover, the gunports were impractical and unlikely to have been effective.

Warfare
As a static structure, castles could often be avoided. Their immediate area of influence was about 400 m and their weapons had a short range even early in the age of artillery. However, leaving an enemy behind would allow them to interfere with communications and make raids. Garrisons were expensive and as a result often small unless the castle was important. Cost also meant that in peace time garrisons were smaller, and small castles were manned by perhaps a couple of watchmen and gate-guards. Even in war, garrisons were not necessarily large as too many people in a defending force would strain supplies and impair the castle's ability to withstand a long siege. In 1403, a force of 37 archers successfully defended Caernarfon Castle against two assaults by Owain Glyndŵr's allies during a long siege, demonstrating that a small force could be effective.

Early on, manning a castle was a feudal duty of vassals to their magnates, and magnates to their kings, however this was later replaced with paid forces. A garrison was usually commanded by a constable whose peace-time role would have been looking after the castle in the owner's absence. Under him would have been knights who by benefit of their military training would have acted as a type of officer class. Below them were archers and bowmen, whose role was to prevent the enemy reaching the walls as can be seen by the positioning of arrowslits.

If it was necessary to seize control of a castle an army could either launch an assault or lay siege. It was more efficient to starve the garrison out than to assault it, particularly for the most heavily defended sites. Without relief from an external source, the defenders would eventually submit. Sieges could last weeks, months, and in rare cases years if the supplies of food and water were plentiful. A long siege could slow down the army, allowing help to come or for the enemy to prepare a larger force for later. Such an approach was not confined to castles, but was also applied to the fortified towns of the day. On occasion, siege castles would be built to defend the besiegers from a sudden sally and would have been abandoned after the siege ended one way or another.

If forced to assault a castle, there were many options available to the attackers. For wooden structures, such as early motte-and-baileys, fire was a real threat and attempts would be made to set them alight as can be seen in the Bayeux Tapestry. Projectile weapons had been used since antiquity and the mangonel and petraria – from Roman and Eastern origins respectively – were the main two that were used into the Middle Ages. The trebuchet, which probably evolved from the petraria in the 13th century, was the most effective siege weapon before the development of cannons. These weapons were vulnerable to fire from the castle as they had a short range and were large machines. Conversely, weapons such as trebuchets could be fired from within the castle due to the high trajectory of its projectile, and would be protected from direct fire by the curtain walls.

Ballistas or springalds were siege engines that worked on the same principles as crossbows. With their origins in Ancient Greece, tension was used to project a bolt or javelin. Missiles fired from these engines had a lower trajectory than trebuchets or mangonels and were more accurate. They were more commonly used against the garrison rather than the buildings of a castle. Eventually cannons developed to the point where they were more powerful and had a greater range than the trebuchet, and became the main weapon in siege warfare.

Walls could be undermined by a sap. A mine leading to the wall would be dug and once the target had been reached, the wooden supports preventing the tunnel from collapsing would be burned. It would cave in and bring down the structure above. Build a castle on a rock outcrop or to surround it with a wide, deep moat helped prevent this. A counter-mine could be dug towards the besiegers' tunnel; assuming the two converged, this would result in underground hand-to-hand combat. Mining was so effective that during the siege of Margat in 1285 when the garrison were informed a sap was being dug they surrendered. Battering rams were also used, usually in the form of a tree trunk given an iron cap. They were used to force open the castle gates, although they were sometimes used against walls with less effect.

As an alternative to the time-consuming task of creating a breach, an escalade could be attempted to capture the walls with fighting along the walkways behind the battlements. In this instance, attackers would be vulnerable to arrowfire. A safer option for those assaulting a castle was to use a siege tower, usually called a belfry. Once ditches around a castle were partially filled in, these wooden movable towers could be pushed against the curtain wall. As well as offering some protection for those inside, a belfry could overlook the interior of a castle, giving bowmen an advantageous position from which to unleash missiles.