In this paper we present an endogenous growth model to analyze the growth maximizing allocation of public investment among N different types of public capital. Using this general model of public capital formation, we analyze the stability of the long-run equilibrium and we derive the growth-maximizing values of the shares of public investment allocated to the different types of public capital, as well as the growth-maximizing tax rate (amount of total public investment as a share of GDP). Then we proceed with an empirical investigation of the theoretical implication of the model that both the effects of the shares of public investment and the tax rate on the long-run growth rate are non-linear, following an inverse U-shaped pattern. Using data of public investment in infrastructure and military capital formation, we derive empirical estimations that confirm the theoretical implications of the model. (JEL E62, H56, O40).