The martian surface shows large outflow channels, widely accepted as having been formed by gigantic floods that could have occurred under climatic conditions like those seen today. Also present are branching valley networks that commonly have tributaries. These valleys are much smaller than the outflow channels and their origins and ages have been controversial. For example, they might have formed through slow erosion by water running across the surface, either early or late in Mars' history, possibly protected from harsh conditions by ice cover. Alternatively, they might have formed through groundwater or ground-ice processes that undermine the surface and cause collapse, again either early or late in Mars' history. Long-duration surface runoff would imply climatic conditions quite different from the present environment. Here we present high-resolution images of martian valleys that support the view that ground water played an important role in their formation, although we are unable as yet to establish when this occurred.