Theoretical literature on whether school competition raises public school productivity is ambiguous (e.g. MacLeod & Urquiola, 2015) and empirical evidence is mixed (e.g. Hsieh and Urquiola, 2006). Moreover, competition might itself be an outcome of changes in productivity (e.g. Hoxby, 2003). We provide evidence for the negative effect of the threat of competition on students' test scores in elementary public schools in Poland. The identification strategy uses the introduction of the amendment facilitating the creation of autonomous schools in Poland in 2009 as an external shock to the threat of competition. We focus on the short run in which there is only a limited set of actions available to schools' principals. For the total sample we find no effect, however, for more competitive urban educational markets, we report a drop in test scores in public schools following the increased threat of competition. This negative effect is robust to the existence of autonomous schools prior to the amendment and to the size of public schools. It does not result from a pre-existing or concurrent trend either. We exclude student sorting and adjustments in schools' expenditures as potential channels.