For millennia, the Channel Coast has been the gateway to England for a host of seemingly irresistible enemies, and for centuries, Dover Castle has withstood the onslaught.

At its closest point, England lies only 17 miles from France. Nowadays this short distance separates two allies, but for most of the preceding 20 centuries the Straits of Dover represented an all-too-narrow moat on a hostile military frontier. In the past five centuries alone, England's enemies have attempted cross-channel invasions on 12 different occasions and made serious preparations for at least nine more. Before then, Britain's history is punctuated by a continual succession of invaders, raiders, and pirates attacking across the narrow straits, going back as far as the invasion of Julius Caesar in 55 BC.

And for as long as Britain's enemies have set their sights on this coast, there have been fortifications at Dover designed to repel them. Dover is a natural harbour cut by the River Dour in the middle of a chalk cliff 13 miles long. In prehistoric times, Dover's Celtic inhabitants crowned the rugged hill on the north-east edge of the harbour with a large fort, encircling the entire hilltop with high earthen ramparts. Since then, the hilltop has been constantly fortified, with each age making its own contributions to a vast and astonishing military site--Dover Castle.

Julius Caesar was the first invader to deal effectively with Dover's intimidating fortifications; when he saw the hillfort protecting the harbour, he simply sailed on and landed seven miles to the north, having decided of Dover: 'It was clearly no place to attempt a landing.' Later, the Romans established one of their most important sea forts at Dover, flanking it with two tall pharos, or lighthouses. The Romans used their Dover fleet to control Saxon pirates, but after the Empire withdrew, the Saxon pirates became the Saxon invaders. They settled within the hillfort, prospering enough to eventually become a burgh, a fortified town. Around the year AD 1000 the Saxons built a beautiful church in their burgh, St. Mary-in-Castro, using the ruined pharos as its bell-tower. Both the church and its pharos-belltower still stand in the grounds of Dover Castle.

William the Conqueror built Dover's first Norman castle, a small affair inside the burgh walls. Henry II, however, realized that this fortification wouldn't stop a future invader any better than the hillfort had stopped Caesar, the Saxons, or William the Conqueror. A future invader, like these great invaders of the past, could simply land elsewhere and take Dover from the rear. Henry wanted a Dover Castle that was so vast and intimidating that it could deny its harbour indefinitely even to an enemy that surrounded it. To do this, Henry II planned a castle on a grand scale, so huge that he had to move the entire burgh of Dover to make way for it. On the old fortified hilltop Henry erected a giant keep, surrounded by two concentric curtain walls, each extraordinarily high and bristling with towers--an unchallengable fortress.

No one had ever built a castle like this before. Archers on the tall outer wall's 30 towers could rake the entire wall's length from above. Should the outer wall fall, archers on the still-taller inner wall, with its 14 great towers, would rain death on anyone bold enough to attempt to cross the outer bailey. This inner wall protected the heart of the castle, the inner bailey, where the garrison lived and the king slept when he was in residence. In the middle of the inner bailey, in isolated splendour, stood the final defence: the magnificent keep, a tower 80 feet tall and a hundred feet on a side, with walls 20 feet thick, heavily defended and with enough provisions to withstand a prolonged siege even with the rest of the castle in enemy hands. Every inch of the inner wall, including the towers, lay exposed to the arrows of archers on the keep roof.

In 1216, a major French invasion put Henry's castle to the test--and it nearly failed. Prince Louis of France, in alliance with English barons rebelling against King John, invaded south-east England. Like previous invaders, the French landed on easy ground and marched inland, quickly gaining control of the entire district--except Dover Castle. Hubert de Burgh, John's fierce Justiciar, held Dover Castle for the King with only 140 knights but ample provisions. The French invaders quickly discovered the castle's weak point: an area of high ground outside the North Gate where they could avoid the downward fire from the defenders. From there the French breached the outer wall by undermining the gate and letting it collapse into the tunnel. But the inner walls held, and de Burgh's knights pushed the French back through the breech. This blunted Prince Louis' appetite for storming the great fortress, and the invasion fizzled.

Under a new king, Henry III, de Burgh set about altering the battered castle to prevent another such attack. He completely blocked the failed North Gate and threw up great outworks beyond it to deny the high ground to any future invaders. He linked the outworks to the castle with a maze of underground passages--the Medieval Tunnels that fascinate visitors today. De Burgh then replaced the North Gate with the splendid Constable's Gateway, protected by no fewer than six overlapping towers, and still the residence of the Deputy Constable of Dover Castle. Finally, he extended the outer wall and its towers all the way to the cliff's edge, an enormous distance. When de Burgh's alterations were done, he had created the medieval castle we see today.

After 1500, gunpowder weapons made Dover Castle increasingly obsolete, and its garrison slowly dwindled. Then, in 1744, French Jacobites began to pose a serious threat of invasion, and Dover Castle came alive. As the garrison swelled, engineers added gun batteries and replaced the medieval buildings that lined the inner bailey with barracks. These elegant barracks, the oldest in England, still ring the austere medieval keep. But these changes, the first military additions to Dover in five centuries, were just a prelude to those made during the Napoleonic Wars. As Napoleon massed an invasion force of 100,000 troops within sight of Dover, the castle's military engineers scrambled frantically to strengthen a castle built to withstand arrows and rocks.

These modernization efforts encrust every corner of the castle. The engineers strengthened the outer wall with earthen ramparts and mounted guns on them. They replaced the keep's medieval roof with a vaulted brick one and placed additional guns there, too. Medieval towers that blocked the artillery's fields of fire were partially dismantled. Guns were placed all over the Western Heights opposite the castle, mounted in an elaborate network of redoubts, batteries, and tunnels. Further gun and infantry positions sprang up all over the slopes below the castle, ringing it with elaborate outworks reached via brick tunnels. Many of these outworks consist of long galleries set in the hillside, with gun loops from which riflemen could sweep attacking infantry off the adjoining slopes. Finally, the defenders mounted guns on the medieval outwork by converting it into an elaborate brick redan, or gun platform, with intricate underground tunnels. The redan tunnels, linked to the original medieval tunnels, are open to the public, and other Napoleonic outworks and tunnels may be opened in the future.

The Napoleonic engineers put up barracks and support structures every place they could find, but still they ran out of room. In 1797, they went underground, building an elaborate system of underground barracks, seven parallel brick vaults of great length and height linked by a tunnel to their rear. At the rear the vaults are 50 feet underground, but in front, along the cliff face, a balcony offers sweeping views over Dover Harbour. Called 'the Casements', they were first occupied in 1803 and held 2,000 soldiers.

The Casements took on new significance during the Second World War. When Vice-Admiral Bertram Home Ramsey took command of Channel defences in 1939, he saw the Casement tunnels as an ideal headquarters. Bombproof and discrete, the Casements already had good communications and security. They even had good views, allowing Ramsey to stand on a private, nearly invisible balcony in the cliff-side and see everything between Dover Harbour and France. From this vantage point Ramsey ran the remarkable Operation Dynamo that evacuated 338,000 British troops from the shores of Dunkirk in May 1940.

As the war continued, all Channel-related activity consolidated under Ramsey's command, and the Casements became a crowded rabbit warren of offices and communications equipment. Ramsey had to expand the tunnels. This he did in two sections. First he added a set of new tunnels above the Casement tunnels, called 'the Annexe' and designed as a hospital with a carefully planned sequence of rooms leading back from an ambulance bay inside the castle. Later he added a lower level, called 'Dumpy', to serve as additional administrative space. All the tunnels were in full use until victory in 1945.

The army finally left Dover Castle in 1958, giving it to the Ministry of Works (now English Heritage) for preservation. But they didn't turn over the tunnels. Instead, they converted them into a Regional Seat of Government for controlling what would remain of south-east England after a nuclear war. This required a major modernization, with new air filtration, power generation, and communications equipment. Dumpy Level held the offices, while the Annexe was converted to barracks and mess halls for the people below. The Casements, made of brick and situated too close to the cliff edge, went unused.

The very existence of these tunnels remained a military secret even as tourists wandered over the castle grounds above them. Then in 1984 the military decommissioned the underground installation and turned it over to the English Heritage staff at Dover Castle. Says General Manager Ken Scott, 'They just handed me the keys and said, "The tunnels are yours now." It was extraordinary. They had just walked away from it, leaving everything in place.' English Heritage found an astonishing wealth of material, much of it stacked in the Casements to get it out of the way: hospital equipment from the Second World War, original telephone exchange equipment from the '30s and '40s, even theatre maps and equipment from Ramsey's operations rooms.

English Heritage has now opened the Casements and the Annexe to the public as 'The Secret Wartime Tunnels'; Dumpy Level still awaits restoration. They have returned the Annexe to its Second World War appearance as a hospital, with original equipment carefully placed to mirror its original location. On tours, smells and sounds assault visitors: gurneys wheel by, footsteps echo, disinfectant reeks from the preparation room, while beef stew odours float from the mess. The transition from the Annexe to the Casements is sudden, from cramped steel-lined tunnels to the cool, tall vaults of the Napoleonic engineers. The Casements house the original telephone exchange equipment that once directed the entire Channel war effort, and the anti-aircraft operations room retains its original furnishings. The vault that contained Admiral Ramsey's office has been cleared but left unrestored, to give an impression of the vast size of the Napoleonic barracks.

Today Dover Castle is a peaceful place. Even on a warm Sunday afternoon, its wide fields and shaded walks easily accommodate sightseers. Its major features are certainly exciting: its great walls and astonishing keep, the six clustered towers of Constable's Gateway, the amazing tunnel systems from medieval, Napoleonic, and modern times, and the beautiful little Saxon church and its tall Roman pharos. But it's also a curiously peaceful place, with long, tree-shaded walks under tall walls and beautiful towers, the spread of wildflowers in the dry moat, and the sweeping views over the town, the cliffs and the harbour. Of the many viewpoints, perhaps the most impressive is the one from the Casements balcony favoured by Admiral Ramsey. Taking in this peaceful view over the busy harbour towards the French shore, it is easiest to forget that in Admiral Ramsey's day, this was England's front line of defence, known as 'Hellfire Corner'.