This study assessed the costs and effectiveness of an HIV prevention program based on the distribution of anti-AIDS kits and a needle exchange service which has been in operation in Navarra, Spain, since 1993. Total costs of the program, including production, storage, distribution, and management, were estimated. Effectiveness, defined as the number of averted HIV infections among injection drug users due exclusively to needle use patterns was calculated as a function of the level of coverage of the program using a mathematical model. The estimated number of averted HIV infections ranged from 7.59 (in 1995) to 1.23 (in 2000). Yearly incremental cost-effectiveness ratios (ICER) ranged from euro 8,331 (in 1994) to euro 44,287 (in 2000) per HIV infection averted. With the health care costs of treating an HIV infection estimated at euro 99,371, the program has been cost-saving every year throughout the period considered. One-way sensitivity analysis was performed for five uncertain parameters. The results confirmed our findings. We conclude that this program was cost-saving from the health care system perspective.