Extreme events occur in many spatially extended dynamical systems, often devastatingly affecting human life which makes their reliable prediction and efficient prevention highly desirable. We study the prediction and prevention of extreme events in a spatially extended system, a system of coupled FitzHugh-Nagumo units, in which extreme events occur in a spatially and temporally irregular way. Mimicking typical constraints faced in field studies, we assume not to know the governing equations of motion and to be able to observe only a subset of all phase-space variables for a limited period of time. Based on reconstructing the local dynamics from data and despite being challenged by the rareness of events, we are able to predict extreme events remarkably well. With small, rare, and spatiotemporally localized perturbations which are guided by our predictions, we are able to completely suppress extreme events in this system.