To review the incidence, aetiology and outcomes of endophthalmitis during a 20-year period in a Norwegian university hospital. Single-centre retrospective review. Medical records of all patients admitted to Stavanger University Hospital with suspected endophthalmitis between January 1999 and December 2018 were reviewed. We identified 84 eyes of 81 patients. Postoperative endophthalmitis (PE) was seen in 64 eyes (76%), endogenous endophthalmitis in thirteen eyes (15%), trauma in four eyes (5%) and three eyes (4%) had keratitis-associated endophthalmitis. Administration of intravitreal injections (IVI) was the most common cause (30%), followed by cataract surgery (CS) (21%). Of 40238 IVI, 23 PE cases were identified (incidence, 0.057%; 95% confidence interval [CI] 0.036-0.086%). Of 39697 CS, 12 PE cases were identified (incidence, 0.030%; 95%CI 0.016-0.053%). After introduction of intracameral cefuroxime PE incidence after CS decreased from 0.10% in 1999-2003 to 0.015% in 2004-2018 (p=0.003). Eighty-four per cent of organisms were Gram-positive. Coagulase-negative staphylococci accounted for 54% of culture-proven cases, and 89% of post-IVI culture-proven cases. Thirty eyes (36%) either regained their previous vision or lost ≤1 Early Treatment Diabetic Retinopathy Study line. One third of endophthalmitis cases had a favourable visual outcome of logMAR 0.2 or better. PE after IVI occurred in 1 in 1750 procedures, and was the most common cause of PE. The incidence of PE after CS has decreased >sixfold since 2003, to 1 in 6700 surgeries. A high proportion of low-virulence bacterial species may have contributed to the favourable visual outcome.