We report a measurement of the energy spectrum of cosmic rays for energies above $2.5 {times} 10^{18}~$eV based on 215,030 events recorded with zenith angles below $60^circ$. A key feature of the work is that the estimates of the energies are independent of assumptions about the unknown hadronic physics or of the primary mass composition. The measurement is the most precise made hitherto with the accumulated exposure being so large that the measurements of the flux are dominated by systematic uncertainties except at energies above $5 {times} 10^{19}~$eV. The principal conclusions are: (1) The flattening of the spectrum near $5 {times} 10^{18}~$eV, the so-called ankle, is confirmed. (2) The steepening of the spectrum at around $5 {times} 10^{19}~$eV is confirmed. (3) A new feature has been identified in the spectrum: in the region above the ankle the spectral index $gamma$ of the particle flux ($propto E^{-gamma}$) changes from $2.51 pm 0.03~{rm (stat.)} pm 0.05~{rm (sys.)}$ to $3.05 pm 0.05~{rm (stat.)} pm 0.10~{rm (sys.)}$ before changing sharply to $5.1 pm 0.3~{rm (stat.)} pm 0.1~{rm (sys.)}$ above $5 {times} 10^{19}~$eV. (4) No evidence for any dependence of the spectrum on declination has been found other than a mild excess from the Southern Hemisphere that is consistent with the anisotropy observed above $8 {times} 10^{18}~$eV.