We analyse the causal impact of competition on managerial quality and hospital performance. To address the endogeneity of market structure we analyse the English public hospital sector where entry and exit are controlled by the central government. Because closing hospitals in areas where the governing party is expecting a tight election race ("marginals") is rare due to the fear of electoral defeat, we can use political marginality as an instrumental variable for the number of hospitals in a geographical area. We find that higher competition results in higher management quality, measured using a new survey tool, and improved hospital performance. Adding a rival hospital increases management quality by 0.4 standard deviations and increases survival rates from emergency heart attacks by 9.7%. We confirm the robustness of our IV strategy to "hidden policies" that could be used in marginal districts to improve hospital management and to changes in capacity that may follow from hospital closure.