The custom of ‘piping the side’ dates from the days of sail, when ships’ captains were often called upon to report onboard their senior officer’s flagship to receive or discuss orders.
When the sea was too rough to permit the use of gangways, the visiting captain would enter and leave his boat by means of a bosun’s chair rigged on a yardarm whip.
The boat carrying a visiting captain would lay off the flagship and an order would given to ‘hoist him in’. The captain would be hoisted out of his boat with the requisite orders passed by pipes made on a bosun’s call.
The present call used for piping the side has its origins with the pipe once used for ‘hoisting and walking away’. Over time, this practice evolved and the use of this ‘pipe’ became a form of salute practised, in varying ways, throughout many of the world’s navies.
Today, piping the side is a form of salute forming part of the 'gangway ceremonial'. By custom, and due to its nautical origins, piping the side is not extended to officers of the other services or consular officers. It is customary for the corpse of a naval officer or sailor transferred ashore for burial to be piped over the side when they leave the ship for the final time.