A pilot is a mariner who manoeuvres ships through dangerous or congested waters, such as harbors or river mouths, and completes the berthing / unberthing operation of the ships by controlling the ship's manoeuvrability directly and the tugs and shore linesmen through a radio. Pilots are expert shiphandlers who possess detailed knowledge of local waterways. They are transported by high speed pilot boats or helicopter from shore to an inbound ship and from an outbound ship back ashore. Most ports have compulsory pilotage.
Legally, the master has full responsibility for safe navigation of his vessel, even if a pilot is on board. If he has clear grounds that the pilot may jeopardise the safety of navigation, he can relieve him from his duties and ask for another pilot or, if not compulsory to have a pilot on board, navigate the vessel without one. Only in transit of the Panama Canal does the pilot have the full responsibility for the navigation of the vessel.
In English law, Section 742 of the Merchant Shipping Act 1894 defines a pilot as "any person not belonging to a ship who has the conduct thereof." In other words, someone other than a member of the crew who has control over the speed, direction, and movement of the ship. The current United Kingdom legislation governing pilotage is the Pilotage Act 1987.