IPA: /ˈhɑːbərˌmɑːstər/
KK: /ˈhɑrbərˌmæstər/
A person in charge of managing and enforcing rules at a harbor, ensuring safe and efficient operations for ships and boats.
The harbormaster checked the incoming vessels to ensure they followed all safety regulations.
Harbormaster is formed from "harbor" (from Old English *herebeorg*, meaning a shelter or refuge) and "master" (from Latin *magister*, meaning a person in authority or a leader). The term refers to a person in charge of managing and overseeing a harbor.
Think of a 'shelter' ('harbor') where someone is in 'authority' ('master') — that's why a harbormaster is the person who oversees the harbor.