Coconut Island, HI - Just before sunset, on the campus of the Hawaii Institute of Marine Biology, Mary Hagedorn waited for her mushroom corals to spawn.
As corals go, Fungia is fairly reliable, usually releasing its sperm and eggs two days after the full moon, but this time they were late.
Eventually, as Dr Hagedorn and her assistant watched, one coral tightened its mouth and seemed to exhale, propelling a cloud of sperm into its bath and the water bubbled like hot oatmeal.
A reproductive physiologist with the Smithsonian Institution, Dr Hagedorn, 57, is building what is essentially a sperm bank for the world's corals. She hopes her collection - gathered in recent years from corals in Hawaii, the Caribbean and Australia - will someday be used to restore, and even rebuild, damaged reefs.
She estimates that she has frozen 1 trillion coral sperm, enough to fertilise 500 million to 1 billion eggs. In addition, there are 3 billion frozen embryonic cells; some have characteristics of stem cells, meaning they may have the potential to grow into adult corals.
Dr Hagedorn's collection is the only one of its kind. While corals can reproduce asexually - that is, fragments of coral can grow into clones of their parents - Dr Hagedorn points out that only sexual reproduction maintains genetic diversity within populations, and with it a species' capacity to survive and adapt to change.
For corals, the number of likely partners is shrinking. As climate change warms the oceans, corals are becoming more vulnerable to disease and bleaching.
In recent years, bleaching events have grown from local curiosities to global phenomena and, in some cases, are so severe and long-lasting that the corals cannot recover. Meanwhile, rising carbon dioxide levels are acidifying the oceans, inhibiting the growth of coral skeletons and weakening the bones of reefs.
In the central and western parts of the Pacific Ocean the extent of living coral is thought to have shrunk by half between the early 1980s and 2003. If this decline continues, almost all of the world's reefs will be on their way to oblivion by 2050.
Dr Hagedorn supports traditional conservation strategies, such as marine refuges, but is preparing for their failure. While she freezes coral sperm and eggs for future use, colleagues are refining techniques for raising coral in captivity and for reintroducing young corals to their natural habitats.
But she and her colleagues have to struggle to raise money for her efforts, which are often seen as a distraction from the more immediate job of habitat protection.
Last northern autumn, she and a group of colleagues travelled to Australia at the invitation of the Australian Institute of Marine Science. Using techniques developed by Dr Hagedorn, they froze sperm and cells from colonies of Acropora tenuis and Acropora millepora, two of the roughly 400 coral species native to the Great Barrier Reef.