[1] Self-consistent models for 11 neutral and 18 ion species from 80 to 300 km on Mars have been developed by solving the continuity equations including ambipolar diffusion for ions. The models were calculated for the conditions of the HST, FUSE, and Mariner 6 and 7 observations of D, H 2 , and H, respectively, when the solar activity index was equal to 25, 61, and 88 at Mars orbit, respectively. Special care was taken to simulate the processes of H 2 and HD dissociation in the reactions with CO 2 + , O + , CO + , N 2 + , N + , Ar + , and O( 1 D) and by photoelectrons. Thermal and nonthermal escape velocities were used as the upper boundary conditions for H 2 , H, HD, D, and He. The H 2 and HD mixing ratios of 15 ppm and 11 ppb chosen to fit the FUSE and HST observations of H 2 and D, respectively, result in (HD/H 2 )/(HDO/H 2 O) = 0.4. This value agrees with the depletion of D in H 2 because of the smaller HDO photolysis cross section and the preferential condensation of HDO above the condensation level. Therefore the controversial problem of deuterium fractionation is solved throughout the atmosphere. The influx of cometary water was %0.5 m planetwide in the last 3.8 billion years. It cannot affect the estimates of more than 30 m of water lost by sputtering and nonthermal and thermal escape and more than 1.3 km of water lost in the reaction with iron with subsequent hydrodynamic escape of H 2 . The calculated ion density profiles at various solar activity and the column reaction rates provide complete quantitative information for behavior of each ion, its formation, and its loss. The HCO + ion is abundant in Mars' ionosphere because it is a final product of many reactions of other ions with H 2 and does not react with neutral species.INDEX TERMS: 5405 Planetology: Solid Surface Planets: Atmospheres-composition and chemistry; 5407 Planetology: Solid Surface Planets: Atmospheresevolution; 5409 Planetology: Solid Surface Planets: Atmospheres-structure and dynamics; 5435 Planetology: Solid Surface Planets: Ionospheres (2459); 6225 Planetology: Solar System Objects: Mars; KEYWORDS: Mars, thermosphere, ionosphere, ion composition, evolution of water Citation: Krasnopolsky, V. A., Mars' upper atmosphere and ionosphere at low, medium, and high solar activities: Implications for evolution of water,