Etymology
Today it means: An official responsible for the enforcement of regulations in a port. Full definition →
From harbor + master.
Etymology from Wiktionary, CC BY-SA 4.0.