Originally referred to rope on sailing ships, which you’d stop hauling and tie off on a belaying pin; belaying is a technique still used in climbing now.
See also avast, which still gets used (unironically) on naval ships to mean ‘stop hauling in / paying out rope’, i.e. during refuelling at sea :)