Solar flares are powered by a rapid release of energy in the solar corona, thought to be produced by the decay of the coronal magnetic field strength. Direct quantitative measurements of the evolving magnetic field strength are required to test this. We report microwave observations of a solar flare, showing spatial and temporal changes in the coronal magnetic field. The field decays at a rate of ~5 Gauss per second for 2 minutes, as measured within a flare subvolume of ~1028 cubic centimeters. This fast rate of decay implies a sufficiently strong electric field to account for the particle acceleration that produces the microwave emission. The decrease in stored magnetic energy is enough to power the solar flare, including the associated eruption, particle acceleration, and plasma heating.