OBJECTIVE. Our goal was to compare the efficacy and safety of buccal midazolam with rectal diazepam in the treatment of prolonged seizures in Ugandan children. METHODS. This was a single-blind, randomized clinical trial in which 330 patients were randomly assigned to receive buccal midazolam or rectal diazepam. The trial was conducted in the pediatric emergency unit of the national referral hospital of Uganda. Consecutive patients who were aged 3 months to 12 years and presented while convulsing or who experienced a seizure that lasted > 5 minutes were randomly assigned to receive buccal midazolam plus rectal placebo or rectal diazepam plus buccal placebo. The primary outcome of this study was cessation of visible seizure activity within 10 minutes without recurrence in the subsequent hour. RESULTS. Treatment failures occurred in 71 (43.0%) of 165 patients who received rectal diazepam compared with 50 (30.3%) of 165 patients who received buccal midazolam. Malaria was the most common underlying diagnosis (67.3%), although the risk for failure of treatment for malaria-related seizures was similar: 35.8% for rectal diazepam compared with 31.8% for buccal midazolam. For children without malaria, buccal midazolam was superior (55.9% vs 26.5%). Respiratory depression occurred uncommonly in both of the treatment arms. CONCLUSION. Buccal midazolam was as safe as and more effective than rectal diazepam for the treatment of seizures in Ugandan children, although benefits were limited to children without malaria.