Images of geomorphological features that seem to have been produced by the action of liquid water have been considered evidence for wet surface conditions on early Mars. Moreover, the recent identification of large deposits of phyllosilicates, associated with the ancient Noachian terrains suggests long-timescale weathering of the primary basaltic crust by liquid water. It has been proposed that a greenhouse effect resulting from a carbon-dioxide-rich atmosphere sustained the temperate climate required to maintain liquid water on the martian surface during the Noachian. The apparent absence of carbonates and the low escape rates of carbon dioxide, however, are indicative of an early martian atmosphere with low levels of carbon dioxide. Here we investigate the geochemical conditions prevailing on the surface of Mars during the Noachian period using calculations of the aqueous equilibria of phyllosilicates. Our results show that Fe3+-rich phyllosilicates probably precipitated under weakly acidic to alkaline pH, an environment different from that of the following period, which was dominated by strongly acid weathering that led to the sulphate deposits identified on Mars. Thermodynamic calculations demonstrate that the oxidation state of the martian surface was already high, supporting early escape of hydrogen. Finally, equilibrium with carbonates implies that phyllosilicate precipitation occurs preferentially at a very low partial pressure of carbon dioxide. We suggest that the possible absence of Noachian carbonates more probably resulted from low levels of atmospheric carbon dioxide, rather than primary acidic conditions. Other greenhouse gases may therefore have played a part in sustaining a warm and wet climate on the early Mars.