We investigate how university governance affects research output, measured by patenting and international university research rankings. For both European and U.S. universities, we generate several measures of autonomy, governance, and competition for research funding. We show that university autonomy and competition are positively correlated with university output, both among European countries and among U.S. public universities. We then identity a (political) source of exogenous shocks to funding of U.S. universities. We demonstrate that, when a state's universities receive a positive funding shock, they produce more patents if they are more autonomous and face more competition from private research universities. Finally, we show that during periods when merit-based competitions for federal research funding have been most prominent, universities produce more patents when they receive an exogenous funding shock, suggesting that routine participation in such competitions hones research skill.