To assess the value of improved monitoring of medication-taking behavior in a drug trial, we employed a modified pill vial with microcircuitry to record the precise times when the vials were opened. After a 3-week placebo washout period, 21 ambulatory subjects with mild hypertension (mean age, 57 years; 67% men; 76% white) randomly received isradipine or enalapril twice daily in a double-blind titration during 10 weeks. Both drugs achieved a 13% reduction in sitting diastolic blood pressure (p less than 0.01) with minimal symptomatic or laboratory toxicity. Although pill counts indicated near-perfect compliance (92% to 99% for both groups), the electronic monitor showed that fewer than half of all openings occurred at the prescribed interval of 12 +/- 2 hours. Modest overdispensing was documented in the 3 days before scheduled visits. The monitor confirmed that pill count misclassified compliance sufficiency in 22% of visits and permitted more discrete attribution for drug-associated adverse reactions and secondary resistance to treatment. We conclude that the electronic monitor reduces ambiguity about medication compliance and helps interpret both the biology and pharmacology of the trial.