Four hydrogen (H2) lines have been detected in a spectrum of Mars observed with the Far Ultraviolet Spectroscopic Explorer. Three of those lines are excited by the solar Lyman β photons. The line intensities correspond to a column H2 abundance of 1.17 (+/-0.13) × 1013 per square centimeter above 140 kilometers on Mars. A photochemical model for the upper atmosphere that simulates the observed H2 abundance results in an H2 mixing ratio of 15 +/- 5 parts per million in the lower atmosphere. The H2 and HD mixing ratios agree with photochemical fractionation of D (deuterium) between H2O and H2. Analysis of D fractionation among a few reservoirs of ice, water vapor, and molecular hydrogen on Mars implies that a global ocean more than 30 meters deep was lost since the end of hydrodynamic escape. Only 4% of the initially accreted water remained on the planet at the end of hydrodynamic escape, and initially Mars could have had even more water (as a proportion of mass) than Earth.