With the help of a gigantic cosmic lens, astronomers have measured the magnetic field of a galaxy nearly five billion light-years away. The achievement is giving them important new clues about a problem at the frontiers of cosmology—the nature and origin of the magnetic fields that play an important role in how galaxies develop over time.