From 1810 until the withdrawal of British forces from Australia in 1870, about 20,000 British soldiers, serving in 24 British infantry regiments undertook garrison duties in Australia on a rotational basis, along with elements of the marines, Royal Engineers and Royal Artillery. Many of these units were veterans of famous battles of the Napoleonic Wars, and ultimately 13 "Peninsula regiments" served in the colonies. While deployed, British Army regiments undertook a variety of duties. This included guarding convict settlements, hunting down bushrangers, suppressing armed resistance by Indigenous Australians, providing security on the goldfields, assisting local police to maintain public order, undertaking ceremonial duties and developing the infrastructure of the nation's military defences.