Ziolkowski et al. show that mouse pancreatic β cells that lose expression of heparan sulphate die in vitro, but cell death is prevented by addition of this glycosaminoglycan to the culture medium. In nonobese, diabetic (NOD) mice, autoimmune destruction of β cells was associated with production of heparanase, an enzyme that degrades heparan sulphate. Treatment of NOD mice with a heparanase inhibitor prevented loss of heparan sulphate in islets and slowed the development of type 1 diabetes mellitus.