The first canals of Amsterdam were dug during the middle ages for water management and defense. As the city expanded, successive defense moats ended up inside the walls and lost their function. But they acquired an important new one: local transport of merchandise. The warehouses along the old moats could store enormous quantities of trading goods that could be pipelined through those moat-canals to a harbor full of ships. The canals divide the city of Amsterdam into 90 different islands and the city has approximately 1,300 more bridges than the Italian city of Venice.