Prevention and restoration are two options for minimizing environmental and economic damages caused by invasive species. Prevention lowers the probability of an invasive species arriving. However, once invasive species have invaded an ecosystem, it is rarely economically or physically viable to eradicate them. Policy after invasion then focuses on restoration or returning habitats to their un-invaded states. We determine the optimal prevention of invasion of the emerald ash borer in Colorado, given the timing of invasion is uncertain and that managers may be able to restore the invaded ecosystem upon an invasive species arrival. Results are used to generate a switching frontier where it is optimal to invest (or not) in prevention given combinations of the probability of invasion, effectiveness of prevention efforts, and restoration possibilities.