  We examine the history of the loss and replenishment of the Martian
atmosphere using elemental and isotopic compositions of nitrogen and noble
gases. The evolution of the atmosphere is calculated by taking into
consideration various processes: impact erosion and replenishment by asteroids
and comets, atmospheric escape induced by solar radiation and wind, volcanic
degassing, and gas deposition by interplanetary dust particles. Our model
reproduces the elemental and isotopic compositions of N and noble gases (except
for Xe) in the Martian atmosphere, as inferred from exploration missions and
analyses of Martian meteorites. Other processes such as ionization-induced
fractionation, which are not included in our model, are likely to make a large
contribution in producing the current Xe isotope composition. Since intense
impacts during the heavy bombardment period greatly affect the atmospheric
mass, the atmospheric pressure evolves stochastically. Whereas a dense
atmosphere preserves primitive isotopic compositions, a thin atmosphere on
early Mars is severely influenced by stochastic impact events and following
escape-induced fractionation. The onset of fractionation following the decrease
in atmospheric pressure is explained by shorter timescales of isotopic
fractionation under a lower atmospheric pressure. The comparison of our
numerical results with the less fractionated N ($^15$N/$^14$N) and Ar
($^38$Ar/$^36$Ar) isotope compositions of the ancient atmosphere recorded in
the Martian meteorite Allan Hills 84001 provides a lower limit of the
atmospheric pressure in 4 Ga to preserve the primitive isotopic compositions.
We conclude that the atmospheric pressure was higher than approximately 0.5 bar
at 4 Ga.
