Hotspots of crime localized in space and time are well documented. Previous mathematical models of urban crime have exhibited these hotspots but considered a static or otherwise suboptimal police response to them. We introduce a program of police response to hotspots of crime in which the police adapt dynamically to changing crime patterns. In particular, they choose their deployment to solve an optimal control problem at every time. This gives rise to a free boundary problem for the police deployment's spatial support. We present an efficient algorithm for solving this problem numerically and show that police presence can prompt surprising interactions among adjacent hotspots.