The climate of Mars likely evolved from a warmer, wetter early state to the cold, arid current state. However, no solutions for this evolution have previously been found to satisfy the observed geological features and isotopic measurements of the atmosphere. Here we show that a family of solutions exist, invoking no missing reservoirs or loss processes. Escape of carbon via CO photodissociation and sputtering enriches heavy carbon (^(13)C) in the Martian atmosphere, partially compensated by moderate carbonate precipitation. The current atmospheric ^(13)C/^(12)C and rock and soil carbonate measurements indicate an early atmosphere with a surface pressure <1 bar. Only scenarios with large amounts of carbonate formation in open lakes permit hi...