The quantum mechanics of two identical particles with spin S in three dimensions is reformulated by employing not the usual fixed spin basis but a transported spin basis that exchanges the spins along with the positions. Such a basis, required to be smooth and parallel-transported, can be generated by an ‘exchange rotation’ operator resembling angular momentum. This is constructed from the four harmonic oscillators from which the two spins are made according to Schwinger's scheme. It emerges automatically that the phase factor accompanying spin exchange with the transported basis is just the Pauli sign, that is (−1)2S. Singlevaluedness of the total wavefunction, involving the transported basis, then implies the correct relation between spin and statistics. The Pauli sign is a geometric phase factor of topological origin, associated with non-contractible circuits in the doubly connected (and non-orientable) configuration space of relative positions with identified antipodes. The theory extends to more than two particles.