BACKGROUND Hospitalization and subsequent discharge home often involve discontinuity of care, multiple changes in medication regimens, and inadequate patient education, which can lead to adverse drug events (ADEs) and avoidable health care utilization. Our objectives were to identify drug-related problems during and after hospitalization and to determine the effect of patient counseling and follow-up by pharmacists on preventable ADEs. METHODS We conducted a randomized trial of 178 patients being discharged home from the general medicine service at a large teaching hospital. Patients in the intervention group received pharmacist counseling at discharge and a follow-up telephone call 3 to 5 days later. Interventions focused on clarifying medication regimens; reviewing indications, directions, and potential side effects of medications; screening for barriers to adherence and early side effects; and providing patient counseling and/or physician feedback when appropriate. The primary outcome was rate of preventable ADEs. RESULTS Pharmacists observed the following drug-related problems in the intervention group: unexplained discrepancies between patients’ preadmission medication regimens and discharge medication orders in 49% of patients, unexplained discrepancies between discharge medication lists and postdischarge regimens in 29% of patients, and medication nonadherence in 23%. Comparing trial outcomes 30 days after discharge, preventable ADEs were detected in 11% of patients in the control group and 1% of patients in the intervention group (P = .01). No differences were found between groups in total ADEs or total health care utilization. CONCLUSIONS Pharmacist medication review, patient counseling, and telephone follow-up were associated with a lower rate of preventable ADEs 30 days after hospital discharge. Medication discrepancies before and after discharge were common targets of intervention.