Experimental design and methods. The study will be a randomized double-blind clinical trial with two treatment groups (55 per group): aripiprazole (15 mg oral daily) and placebo. All patients will receive standard treatment (methadone daily and individual counseling weekly) for 39 weeks. To establish abstinence prior to aripiprazole induction, contingent vouchers will be given for each cocaine-negative urine specimen during the first 12 weeks (weeks 1-12). Participants who are abstinent from cocaine during weeks 11 and 12 will be randomized to receive aripiprazole or aripiprazole placebo in weeks 13 through 27 (induction, weeks 13 and 14; taper, week 27). From weeks 28-33, participants will receive methadone and counseling only, and then will be offered assistance to transfer to another program; those who do not transfer will undergo an 8-week methadone detoxification. The primary outcome measures will be time to relapse and longest duration of cocaine abstinence. Secondary objectives include evaluating whether the treatment groups differ in self-reported changes in drug use and proportion of drug-negative urine specimens. In addition, drug use, drug craving, stress, and HIV-risk behaviors such as injection practices will be assessed via electronic diaries (ecological momentary assessment, EMA).