Numbers of non-indigenous species--species introduced from elsewhere - are increasing rapidly worldwide, causing both environmental and economic damage. Rigorous quantitative risk-analysis frameworks, however, for invasive species are lacking. We need to evaluate the risks posed by invasive species and quantify the relative merits of different management strategies (e.g. allocation of resources between prevention and control). We present a quantitative bioeconomic modelling framework to analyse risks from non-indigenous species to economic activity and the environment. The model identifies the optimal allocation of resources to prevention versus control, acceptable invasion risks and consequences of invasion to optimal investments (e.g. labour and capital). We apply the model to zebra mussels (Dreissena polymorpha), and show that society could benefit by spending up to US$324 000 year(-1) to prevent invasions into a single lake with a power plant. By contrast, the US Fish and Wildlife Service spent US$825 000 in 2001 to manage all aquatic invaders in all US lakes. Thus, greater investment in prevention is warranted.