We introduce and analyze a class of one-dimensional insulating Hamiltonians that, when adiabatically varied in an appropriate closed cycle, define a “Z2 pump.” For an isolated system, a single closed cycle of the pump changes the expectation value of the spin at each end even when spin-orbit interactions violate the conservation of spin. A second cycle, however, returns the system to its original state. When coupled to leads, we show that the Z2 pump functions as a spin pump in a sense that we define, and transmits a finite, though nonquantized, spin in each cycle. We show that the Z2 pump is characterized by a Z2 topological invariant that is analogous to the Chern invariant that characterizes a topological charge pump. The Z2 pump is closely related to the quantum spin Hall effect, which is characterized by a related Z2 invariant. This work presents an alternative formulation that clarifies both the physical and mathematical meaning of that invariant. A crucial role is played by time reversal symmetry, and we introduce the concept of the time reversal polarization, which characterizes time reversal invariant Hamiltonians and signals the presence or absence of Kramers degenerate end states. For noninteracting electrons, we derive a formula for the time reversal polarization that is analogous to Berry’s phase formulation of the charge polarization. For interacting electrons, we show that Abelian bosonization provides a simple formulation of the time reversal polarization. We discuss implications for the quantum spin Hall effect, and argue in particular that the Z2 classification of the quantum spin Hall effect is valid in the presence of electron electron interactions