Although used principally in medicine for anticoagulation, the true physiological role in the body remains unclear, because blood anti-coagulation is achieved mostly by endothelial cell-derived heparan sulfate proteoglycans. Heparin is usually stored within the secretory granules of mast cells and released only into the vasculature at sites of tissue injury. It has been proposed that, rather than anticoagulation, the main purpose of heparin is in a defensive mechanism at sites of tissue injury against invading bacteria and other foreign materials. In addition, it is preserved across a number of widely different species, including some invertebrates that do not have a similar blood coagulation system.