We show that a quantitative, physically-based model of water balance, combined with a model for the dependence of net primary productivity (NPP) of vegetation on evapotranspiration E leads to the universal scaling of NPP with the climate variables, namely, precipitation P and potential evapotranspiration Ep. The model for NPP is based on percolation theory. The water balance is derived based on the hypothesis that ecosystem selection is driven by optimizing NPP with respect to the principal hydrologic fluxes i.e., E and Q (=P −E; known as run-off), with the flux dependence of E being applied self-consistently to the NPP’s model. The predictions are compared separately with Budyko’s compilation of the NPP data as a function of Ep and P using the aridity index, AI = Ep/P, and Ep for each set of experimental data, and are shown to be in excellent agreement with the data.