  We propose that strong magnetic fields should be generated at shock waves
associated with formation of galaxies or clusters of galaxies by the Weibel
instability, an instability in collisionless plasmas. The strength of the
magnetic fields generated through this mechanism is close to the order of those
observed in galaxies or clusters of galaxies at present. If the generated
fields do not decay rapidly, this indicates that strong amplification of
magnetic fields after formation of galaxies or clusters of galaxies is not
required. This mechanism could have worked even at a redshift of ~10, and
therefore the generated magnetic fields may have affected the formation of
stars in protogalaxies. This model will partially be confirmed by future
observations of nearby clusters of galaxies. Mechanisms that preserve the
magnetic fields for a long time without considerable decay are discussed.
