  Optically trapped ensembles are of crucial importance for frequency
measurements and quantum memories, but generally suffer from strong dephasing
due to inhomogeneous density and light shifts. We demonstrate a drastic
increase of the coherence time to 21 s on the magnetic field insensitive clock
transition of Rb-87 by applying the recently discovered spin self-rephasing.
This result confirms the general nature of this new mechanism and thus shows
its applicability in atom clocks and quantum memories. A systematic
investigation of all relevant frequency shifts and noise contributions yields a
stability of 2.4E-11 x tau^(-1/2), where tau is the integration time in
seconds. Based on a set of technical improvements, the presented frequency
standard is predicted to rival the stability of microwave fountain clocks in a
potentially much more compact setup.
