This is a study of heat fluxes and heat budget of the Mediterranean Sea using the European Centre for Medium-Range Weather Forecasts (ECMWF) 45 year reanalysis data set ERA-40. The simple use of the ERA-40 surface flux components fails to close the budget and, in particular, the shortwave radiation flux is found to be underestimated with respect to observed data by about 10%. The heat flux terms are recomputed and corrected in order to close the heat and freshwater budgets of the Mediterranean basin over the period 1958 to 2001, thus producing a corrected ERA-40 surface flux data set. Various satellite and in situ observational data are used to construct spatially varying corrections to the ERA-40 products needed to compute the air-sea fluxes. The corrected interannual and climatological net surface heat and freshwater fluxes are −7 W/m2 and −0.64 m/yr, respectively, which are regarded as satisfactorily closing the Mediterranean heat and water budgets. It is also argued that there is an important contribution from large heat losses associated with a few severe winters over the Mediterranean Sea. This is shown to be related to wind regime anomalies, which strongly affect the latent heat of evaporation that is mainly responsible for the interannual modulation of the total heat flux. Furthermore, the surface total heat flux anomaly time series is compared with the North Atlantic Oscillation (NAO) index, and the result is a positive correlation with ocean warming for positive NAO index periods and ocean cooling associated with negative index periods.