Most prisoners with histories of pre-incarceration heroin addiction do not receive treatment while incarcerated and seldom enter treatment upon release. Effective treatment for such prisoners is urgently needed because rapid readdiction typically follows release, placing these individuals at risk of HIV infection and other negative consequences of addiction. Additional research to develop effective treatments that begin during incarceration and continue in the community is clearly needed. Based on evidence of methadone maintenance treatment effectiveness in community settings, it appears an especially promising approach for inmates with heroin addiction histories. A five-year study is proposed to examine the benefits of a methadone maintenance treatment program for prison inmates who have been incarcerated for some time and are not currently addicted, initiating maintenance treatment prior to release from prison and continuing treatment in the community. Other than three studies of methadone maintenance with short-term jail inmates, the only study of longer-term inmates was a locally-conducted pilot study involving prison inmates in pre-release status. Based on this pilot research, which found that initiating maintenance treatment in prison is feasible and facilitates entry into community-based treatment after release, we are proposing a more rigorous examination of this unique treatment approach. In the proposed study, prisoners with pre-incarceration histories of heroin addiction having 3-6 months left to serve before release (N=360) will be randomly assigned to one of three conditions: (1) initiation of methadone maintenance in prison, with transfer to community-based methadone maintenance with the same provider immediately upon release; (2) immediate access to methadone maintenance treatment upon release from prison, but no maintenance treatment in prison; and (3) no experimental intervention. This study design will permit disentanglement of the effects of two distinct program components, namely (a) the provision of methadone maintenance treatment prior to release, and (b) the availability of immediate entry into maintenance treatment in the community upon release. Participants in all three conditions will receive drug abuse counseling in prison, along with information on how to access treatment resources in the community. Participants will be assessed at baseline (study entry) and at 1, 3, 6, and 12 months following their release from prison. Outcome measures include: treatment entry and retention in the community; heroin use; cocaine use; HlV-risk behaviors; criminal activity; and employment. The proposed research will also examine the relationship of initial motivation for treatment, early criminal involvement, and cocaine abuse history to treatment outcome.