Large flood channels, valley networks, and a variety of features attributed to the action of ground ice indicate that Mars emerged from heavy bombardment around 3.8Gyr ago, with an inventory of water at the surface equivalent to at least a few hundred meters spread over the whole planet, as compared with 3 km for the Earth. The surface water resided primarily in a porous, kilometers thick, megaregolith created by the high impact rates. At the end of heavy bombardment a rapid decline in erosion rates by a factor of 1000 suggests a major change in the global climate. It is proposed that at this time the climate became similar to today's and that this climate has been maintained throughout the rest of Mars' history. The various drainage features represent an adjustment of the distribution of water to the surface relief inherited from the period of heavy bombardment and to a thickening of the cryosphere as the heat flow declined. The valley networks formed mostly at the end of heavy bombardment when erosion rates were high and climatic conditions permitted an active water cycle. They continued to form after heavy bombardment when the cryosphere started to form by a combination of episodic flooding and mass-wasting aided by the presence of liquid water at shallow depths. As the cryosphere thickened with declining heat flow, water could no longer easily access the surface and the rate of valley formation declined. Hydrostatic pressures built below the cryosphere. Eruptions of groundwater became more catastrophic and massive floods resulted, mainly in upper Hesperian time. Flood sources were preferentially located in low-lying, low-latitude areas where the cryosphere was thin, or near volcanoes where a thinner than typical cryosphere is also expected. Floods caused a drawdown in the global water table so that few formed in the second half of Mars' history. The floodwaters pooled in low-lying areas, mostly in the northern plains. Some of the water may still be present as thick ice deposits, some has been lost to space, particularly during periods of high obliquity. Published by Elsevier Science Ltd.