All planetary atmospheres respond to the enhanced x-rays and ultraviolet (UV) light emitted from the Sun during a flare. Yet only on Earth are observations so continuous that the consequences of these essentially unpredictable events can be measured reliably. Here, we report observations of solar flares, causing up to 200% enhancements to the ionosphere of Mars, as recorded by the Mars Global Surveyor in April 2001. Modeling the altitude dependence of these effects requires that relative enhancements in the soft x-ray fluxes far exceed those in the UV.