. . .[Hammurabi] was the ruler who chiefly established the greatness of Babylon, the world's first metropolis. Many relics of Hammurabi's reign ([1795-1750 BCE]) have been preserved, and today we can study this remarkable King . . . as a wise law-giver in his celebrated code. . .
. . . Water traffic on the Euphrates and canals was very considerable. Ships, whose tonnage was estimated at the amount of grain they could carry, were continually hired for the transport of all kinds of goods. The Code fixes the price for building (ships) and insists on the builder's giving a year's guarantee of seaworthiness. It fixes the hire of ship and of crew. The captain was responsible for the freight and the ship; he had to replace all losses. Even if he refloated the ship he had to pay a fine of half its value for sinking it. In the case of collision the boat under way was responsible for damages to the boat at anchor. The Code also regulated the liquor traffic, fixing a fair price for beer and forbidding the connivance of the tavern-keeper (a woman) and disorderly conduct or treasonable assembly, under pain of death. She was to hale ["hale" means to pull, drag, draw, or hoist] the offenders to the palace, which implied an efficient and accessible police system. . . .
Selected Codes from the Code of Hammurabi that relate to ships:
233. If a builder build a house for some one, even though he has not yet completed it; if then the walls seem toppling, the builder must make the walls solid from his own means.
234. If a shipbuilder build a boat of sixty gur for a man, he shall pay him a fee of two shekels in money.
235. If a shipbuilder build a boat for some one, and do not make it tight, if during that same year that boat is sent away and suffers injury, the shipbuilder shall take the boat apart and put it together tight at his own expense. The tight boat he shall give to the boat owner.
236. If a man rent his boat to a sailor, and the sailor is careless, and the boat is wrecked or goes aground, the sailor shall give the owner of the boat another boat as compensation.
237. If a man hire a sailor and his boat, and provide it with corn, clothing, oil and dates, and other things of the kind needed for fitting it: if the sailor is careless, the boat is wrecked, and its contents ruined, then the sailor shall compensate for the boat which was wrecked and all in it that he ruined.
238. If a sailor wreck any one's ship, but saves it, he shall pay the half of its value in money.
239. If a man hire a sailor, he shall pay him six gur of corn per year.
240. If a merchantman run against a ferryboat, and wreck it, the master of the ship that was wrecked shall seek justice before God[*]; the master of the merchantman, which wrecked the ferryboat, must compensate the owner for the boat and all that he ruined.
275. If any one hire a ferryboat, he shall pay three gerahs in money per day.
276. If he hire a freight-boat, he shall pay two and one-half gerahs per day.
277. If any one hire a ship of sixty gur, he shall pay one-sixth of a shekel in money as its hire per day.
[*] Note by David Rice: the God in question would be a city / state God, or the son of God Ea, named Marduk.