During the American Revolutionary War, France allied itself with the revolutionaries, causing war with Britain to break out in 1778. The French Revolutionary and Napoleonic Wars followed, during which period Falmouth became an important military depot. In 1795, the Crown purchased the castle's land from the Killigrew family, and reinforced the fortress to deal with the fresh threat of invasion. The government installed more guns and built a new gun position called the Half-Moon Battery just outside the 16th-century walls; the landward defences of Pendennis were reinforced, and a new barracks and other ancillary buildings were built inside the fortress. At its peak, the castle was equipped with up to 48 artillery pieces. A new volunteer unit of artillery was formed in Falmouth to support the forts around the harbour, many of them carrying out training using Pendennis's guns before then deploying elsewhere across Cornwall.