Medieval fortification represents a dynamic co-evolutionary period, spanning from the fall of the Western Roman Empire to the Renaissance, where defensive structures continuously adapted to evolving military tactics and weaponry. Early city and castle walls progressed from timber to more resilient stone constructions, their design influenced by regional resources and perceived threats. Key architectural features included the pomoerium, a clear strip of ground both inside and outside the wall for unobstructed lines of sight and efficient troop movement, and specialized tower designs incorporating arrow loops—narrow vertical slits enabling protected ranged defense. The prevalence of sieges spurred the development of advanced defensive siege engines, notably the trebuchet. This torsion-powered catapult, renowned for its considerable force despite long reloading times (up to an hour), significantly influenced fortification design, leading engineers to thicken and round walls to better withstand its impact and facilitate its own defensive deployment, as seen in the Ayyubid practice of mounting massive trebuchets on towers for height advantage. Less powerful mangonels and onagers offered faster firing rates, while ballistas proved less effective defensively due to limited destructive force against siege engines and immobility.
The advent of gunpowder artillery fundamentally transformed medieval defensive architecture. Cannons, introduced in the early 12th century CE and widespread by the 15th century, rapidly rendered older torsion-powered catapults obsolete. Characterized by their devastating power, capable of leveling walls or destroying siege engines with a single projectile (first recorded defensively at the Siege of Algeciras in 1343-44), cannons necessitated a radical shift in fortification design. Traditional medieval walls, not engineered to withstand sustained cannon fire, became increasingly inadequate, prompting the development of new resilient structures like the star fort, which themselves would later become obsolete with the introduction of explosive shells. Furthermore, fortified harbors were crucial strategic assets, providing vital access for trade, resupply, and troop movement. These maritime defenses often featured intricate wooden structures, including jetties and semi-circular barricades with controlled entry points, occasionally integrating elevated watch and defense platforms to project control over water access, exemplified by reconstructions of sites such as Hedeby.