late Old English hwearf "shore, bank where ships can tie up," earlier "dam, embankment," from Proto-Germanic *hwarfaz (source also of Middle Low German werf "mole, dam, wharf," German Werft "shipyard, dockyard"); related to Old English hwearfian "to turn," perhaps in a sense implying "busy activity," from PIE root *kwerp- "to turn, revolve" (source also of Old Norse hverfa "to turn round," German werben "to enlist, solicit, court, woo," Gothic hvairban "to wander," Greek kartos "wrist," Sanskrit surpam "winnowing fan"). Wharf rat is from 1812 as "type of rat common on ships and docks;" extended sense "person who hangs around docks" is recorded from 1836.