Novel heterocyclic compounds which generate chemiluminescence on reaction with a phosphatase enzyme are provided as well as a process for their preparation and intermediates useful therein. The compounds comprise a nitrogen, oxygen or sulfur-containing heterocyclic ring system bearing an exocyclic carbon-carbon double bond. The double bond is further substituted at the distal carbon with a phosphate group and an oxygen or sulfur atom-containing group. Novel compositions further comprising a cationic aromatic compound (CAC) in addition to the heterocyclic phosphate compound are provided. The addition of the CAC in the composition greatly increases the production of chemiluminescence and provides improved detection sensitivity. Compositions further comprising an anionic surfactant and a non-ionic surfactant provide additional improvements in detection sensitivity. The novel chemiluminescent compounds and compositions are useful in methods for producing light and in assays for phosphatase enzymes and enzyme inhibitors and in assays employing enzyme-labeled specific binding pairs.