Phosphorite or phosphate rock is a sedimentary rock that consists of at least 20% phosphates. Phosphorite has the same internal structure and texture as fine-grained limestone and is often the result of diagenetic transformation of limestone, replacing carbonate with phosphate. This diagenetic conversion requires large amounts of phosphate in the groundwater, such as in the vicinity of large amounts of guano. In most cases, the phosphate is a form of fluorapatite, for example with a carbonate and hydroxyl group (Ca10(PO4CO3)F2-3). and forms masses of very small crystals (cryptocrystalline masses, grain size < 1 μm) called collophane.