We present a detailed multi-wavelength analysis and interpretation of the evolution of an M7.6 flare on October 24, 2003. The X-ray observations of the flare taken from the RHESSI spacecraft reveal two phases of the flare evolution. The first phase is characterized by the altitude decrease of the X-ray looptop (LT) source for $sim$11 minutes. Such a long duration of the descending LT source motion is reported for the first time. The EUV loops, located below the X-ray LT source, also undergo contraction with similar speed ($sim$15 km s$^{-1}$) in this interval. During the second phase the two distinct hard X-ray footpoints (FP) sources are observed which correlate well with UV and H$alpha$ flare ribbons. The X-ray LT source now exhibits upward motion. The RHESSI spectra during the first phase are soft and indicative of hot thermal emission from flaring loops with temperatures $T>25$ MK at the early stage. On the other hand, the spectra at high energies ($varepsilon gtrsim$25 keV) follow hard power laws during the second phase ($gamma = 2.6-2.8$). We show that the observed motion of the LT and FP sources can be understood as a consequence of three-dimensional magnetic reconnection at a separator in the corona. During the first phase of the flare, the reconnection releases an excess of magnetic energy related to the magnetic tensions generated before a flare by the shear flows in the photosphere. The relaxation of the associated magnetic shear in the corona by the reconnection process explains the descending motion of the LT source. During the second phase, the ordinary reconnection process dominates describing the energy release in terms of the standard model of large eruptive flares.