Many patients suffer from mild, moderate or severe pain during or after root canal therapy. The purpose of this study was to evaluate the efficacy of supraperiosteal injection of dexamethasone into the periapical tissues to prevent postoperative pain associated with inflammation. In a double-blind, placebo-controlled clinical trial, 100 patients with moderate or severe pain who were referred to dental school of Tehran Islamic Azad University participated in this study. All patients had a tooth with clinical diagnosis of irreversible pulpitis. After administration of local anaesthesia, access cavity was prepared. Then, the root canals were instrumented to a minimum of a No. 25 K-file. One millilitre dexamethasone (8 mg 2 mL(-1)) or placebo was injected around the tooth. The severity of pain was assessed with regard to a modified visual analogue scale after 6, 12, 24 and 48 h. The data was analysed statistically with chi-square test. Dexamethasone was considerably effective on controlling the severity of pain during the first 24 h; in contrast, there was no difference between dexamethasone and placebo groups 48 h after the first appointment. A single dose of dexamethasone infiltrated around the apex of a tooth with irreversible pulpitis could be effective in reduction or prevention of postoperative endodontic pain during the first 24 h.