A coast guard or coastguard is a maritime security organization of a particular country. The term implies widely different responsibilities in different countries, from being a heavily armed military force with customs and security duties to being a volunteer organization tasked with search and rescue functions and lacking any law enforcement powers. However, a typical coast guard's functions are distinct from typical functions of both the navy (a pure military force) and a transportation police (a civilian law enforcement agency).
The predecessor of the modern Her Majesty's Coastguard of the United Kingdom was established in 1809 as the Waterguard, which was originally devoted to the prevention of smuggling as a department of the HM Customs and Excise authority. At the time, due to high UK taxation on liquors such as brandy, and on tobacco, etc., smuggling in cargoes of these from places such as France, Belgium, and Holland, was an attractive proposition for many, the barrels of brandy and other contraband being landed from the ships on England's beaches at night from small boats and later sold-on for profit, as later depicted in the Doctor Syn series of books by Russell Thorndike. The Coastguard was, however, also responsible for giving assistance to shipwrecks.
Each Waterguard station was issued with a Manby mortar, which had been invented by Captain George William Manby in 1808. The mortar fired a shot with a line attached from the shore to the wrecked ship and was used for many years. This began the process through which the Coastguard assumed a life saving role. In 1821 a committee of inquiry recommended that responsibility for the Preventative Waterguard be transferred to the Board of Customs. The Treasury agreed and (in a memorandum dated 15 January 1822) directed that the preventative services, which consisted of the Preventative Water Guard, cruisers, and riding officers should be placed under the authority of the Board of Customs and in future should be named the "Coastguard". In 1845 the Coastguard was subordinated to the Admiralty.