Marine Safety Act 1998 No 121
88 General powers of harbour master in relation to vessels
(1) The harbour master of any port may direct and control the following:
(a) the time and manner in which any vessel may enter or leave the port,
(b) the navigation and other movements of any vessel within the port or any part of the port,
(c) the position where and the manner in which any vessel may anchor or be secured within the port,
(d) the time and manner of the taking in or discharging by any vessel within the port of cargo, stores, fuel, fresh water or water ballast,
(e) the securing or removal of any vessel within the port in, from or to any position as the harbour master thinks fit.
(2) The harbour master of any port may, as a condition of allowing a vessel to be anchored or secured within a pilotage port, direct that a marine pilot remain on board the vessel while it is so berthed or anchored (whether or not pilotage is compulsory).
(3) A harbour master must not give any direction under this section that would result in a contravention of any law relating to the area or vessel concerned or that would impede the proper administration of the customs or quarantine services within the port.