Fatal heroin overdose has become a leading cause of death among injection drug users (IDUs). Several recent feasibility studies have concluded that naloxone distribution programs for heroin injectors should be implemented to decrease heroin over-dose deaths, but there have been no prospective trials of such programs in North America. This pilot study was undertaken to investigate the safety and feasibility of training injection drug using partners to perform cardiopulmonary resuscitation (CPR) and administer naloxone in the event of heroin overdose. During May and June 2001, 24 IDUs (12 pairs of injection partners) were recruited from street settings in San Francisco. Participants took part in 8-hour training in heroin overdose prevention, CPR, and the use of naloxone. Following the intervention, participants were prospectively followed for 6 months to determine the number and outcomes of witnessed heroin overdoses, outcomes of participant interventions, and changes in participants' knowledge of overdose and drug use behavior. Study participants witnessed 20 heroin overdose events during 6 months follow-up. They performed CPR in 16 (80%) events, administered naloxone in 15 (75%) and did one or the other in 19 (95%). All overdose victims survived. Knowledge about heroin overdose management increased, whereas heroin use decreased. IDUs can be trained to respond to heroin overdose emergencies by performing CPR and administering naloxone. Future research is needed to evaluate the effectiveness of this peer intervention to prevent fatal heroin overdose.