Abstract With the aid of the ion densities measured by the Neutral Gas and Ion Mass Spectrometer and the solar wind dynamic pressures measured by the Solar Wind Ion Analyzer on board the Mars Atmosphere and Volatile EvolutioN, we investigate the modulation of a sequence of ion species in the Martian topside ionosphere by the upstream solar wind condition. Almost all ion species, except for CO 2 + and OCOH+, are very sensitive to the variation of the solar wind condition, and their densities decrease with increasing solar wind dynamic pressure. The response of the topside ion distribution to the variation of the solar wind condition is also found to be remarkably related to the magnetic field orientation, in that the solar wind modulation occurs mainly over regions with near-horizontal field lines. These observations imply substantially enhanced outflow velocities for all ion species under high solar wind dynamic pressures when the ambient magnetic fields are near-horizontal.