Corruption is thought to prevent poor countries from catching-up. We analyze one channel through which corruption hampers growth: public investment can be distorted in favor of specific types of spending for which rent-seeking is easier and better concealed. To study this distortion, we propose an optimal growth model where households vote for the composition of public spending subject to an incentive constraint reflecting individuals' choice between productive activity and rent-seeking. At equilibrium, the intensity of corruption and the structure of public investment are determined by the predatory technology and the distribution of political power. Among different regimes, the model shows a possible scenario of distortion without corruption in which there is no effective corruption yet still the possibility of corruption distorts the allocation of public investment, thus hampering growth. We test the implications of the model on a panel of countries estimating a system of equations with instrumental variables. We find that countries with a high predatory technology invest more in housing and physical capital in comparison with health and education. For equal initial conditions, such countries grow slower and have higher corruption, in particular when political power is concentrated.