also all manner of small arms) for ships based in the Medway, as well as for local artillery emplacements and for army use. (Gunpowder, on the other hand, was received, stored and issued across the river at Upnor Castle.) A plan of 1704 shows (from north to south) a long Storehouse parallel to the river, the Storekeeper's house (the Storekeeper was the senior officer of the Yard) and a pair of Carriage Stores. In 1717 the original Storehouse was replaced with the Grand Store (a much larger three-storey building, contemporary with and of a similar style to, the Main Gatehouse in the Dockyard). Not long afterwards a large new single-storey Carriage Store, with a long frontage parallel to the river, was constructed, adjoining the Storekeeper's House to the south. After the demise of the Board of Ordnance (1855), Ordnance Yards passed under the control of the War Office, and were eventually (in 1891) apportioned to either the Army or the Navy. Chatham's yard was split in two, the area south of the Storekeeper's House becoming an Army Ordnance Store, and the rest a Navy Ordnance Store. It remained thus until 1958 when the yards were closed (the Army depot having served latterly as an atomic weapons research laboratory). Most of the 18th-century buildings were demolished, with the exception of the Storekeeper's House of 1719, which survives as the Command House public house. A few later buildings have survived: a long brick shed of 1805, southwest of the Command House, which once housed carpenters, wheelwrights and other workers as well as stores of various kinds, the adjacent building (machine shop, late-19th century) which now serves as a public library, and the building known as the White House (built as the Clerk of the Cheque's residence in 1816). Defence of the dockyard Upnor Castle Dockyards have always required shore defences. Among the earliest for Chatham was Upnor Castle, built in 1567, on the opposite side of the River Medway. It was somewhat unfortunate that, on the one occasion when it was required for actionthe Raid on the Medway, 1667the Dutch fleet were able to sail right past it to attack the English fleet and carry off the pride of the fleet, HMS Royal Charles, back to the Netherlands. Chain defence During the wars with Spain it was usual for ships to anchor at Chatham in reserve; consequently John Hawkins threw a massive