The ability to treat gonorrhoea with current first-line drugs is threatened by the global spread of extensively drug resistant (XDR) Neisseria gonorrhoeae (NG) strains. In Australia, urban transmission is high among men who have sex with men (MSM) and importation of an XDR NG strain in this population could result in an epidemic that would be difficult and costly to control. An individual-based, anatomical site-specific mathematical model of NG transmission among Australian MSM was developed and used to evaluate the potential for elimination of an imported NG strain under a range of case-based and population-based test-and-treat strategies. When initiated upon detection of the imported strain, these strategies enhance the probability of elimination and reduce the outbreak size compared with current practice (current testing levels and no contact tracing). The most effective strategies combine testing targeted at regular and casual partners with increased rates of population testing. However, even with the most effective strategies, outbreaks can persist for up to 2 years post-detection. Our simulations suggest that local elimination of imported NG strains can be achieved with high probability using combined case-based and population-based test-and-treat strategies. These strategies may be an effective means of preserving current treatments in the event of wider XDR NG emergence.