Kingdom: Animalia
Phylum: Arthropoda
Class: Insecta
Order: Diptera
Family: Keroplatidae
Genus: Arachnocampa
Scientific name: Arachnocampa luminosa
Common names: Titiwai, Glowworm, New Zealand Fungus Gnat,

Arachnocampa luminosa is found only in New Zealand, on both the North and South islands. Its Maori name is Titiwai, meaning "projected over water". The scientific name Arachnocampa luminosa does a good job in describing this type of fly, as roughly translated it means "glowing spider bug". It was first known to science in 1871 when collected from a gold mine in the Thames region. At first, it was thought to be related to the European glowworm beetle, but in 1886 a Christchurch teacher showed it was a larva of a gnat, not a beetle.

The Arachnocampa luminosa go through a life cycle of eggs hatching to larvae then pupating to an adult fly. They spend most of their life as larvae. The larval stage lasts about 6 to 12 months, depending on the food. The larva emerges from the egg only about 3 to 5 millimetres long, and through its life grows to about 3 centimetres. They are voracious hunters and have large mandibles. Their bodies are relatively featureless. The larvae are brown in colour, but the skin is transparent, allowing the bluish-green light to shine through. The body of the larva is soft while the head capsule is hard. When it outgrows the head capsule it moults, shedding its skin. This happens four times through its life. The larva spins a nest out of silk on the ceiling of the cave and then hangs down as many as 70 threads of silk (called snares) from around the nest, each up to 30 or 40 cm long and holding droplets of mucus. The droplets of mucus on the silk threads are poisonous enhancing the trap's ability to subdue prey quickly. When prey is trapped vibrations are sent up the line and sensed by the larva, which then begins to reel in its catch by swallowing the line. When the prey has been reeled up, the larva bites it, kills it, and then either sucks out its juices or eats the entire thing. The larva glows to attract prey into its threads, perhaps luring them into believing they are outdoors, for the roof of a cave covered with larva can look remarkably like a starry sky at night. A hungry larva glows brighter than one which has just eaten. Prey includes midges, mayflies, caddis flies, mosquitoes, moths, or even small snails or millipedes. When prey is caught by a line the larva pulls it up (at up to about 2 millimetres a second) and feeds. The larvae can only live in a place out of the wind, to stop their lines being tangled, hence caves, overhangs or deep rainforest. If prey is scarce the larvae will turn to cannibalism, eating other larvae, pupae or adult flies.
At the end of the larval stage, it becomes a pupa, hanging down from the roof of the cave. The pupal stage lasts about 1 or 2 weeks and it glows intermittently. The male stops glowing a few days before emerging, the female's glow increases. The glow from the female is believed to be to attract a mate, and males may be waiting there when she emerges.
The adult gnats are rarely seen and so are not well described. They are slightly larger than a mosquito, being just over (1.5 cm) in length. They have six long legs and, like all flies, have only one pair of wings. Organs known as halteres are located just behind the wings. They act as flight stabilizers, preventing New Zealand fungus gnats from flying upside down. One peculiar feature in the adult flies is that they lack mouths, and as a result cannot ingest food. Therefore they have short life spans - upon emerging from the pupa, males have only 3-5 days to live and females have only 1-2 days. Their sole purpose is to mate, and for the female to lay eggs. Adult insects are poor fliers and so will often remain in the same area, building a colony of glowworms. The adults also have the ability to glow, but females often lose their luminescence after laying their eggs. The female lays a total of about 130 eggs, in clumps of 40 or 50, and dies soon after laying. The eggs hatch after about 20 days and the cycle repeats.

The glow is the result of a chemical reaction that involves luciferin, a waste product; luciferase, the enzyme that acts upon luciferin; adenosine triphosphate, the energy molecule; and oxygen. It occurs in modified excretory organs known as Malpighian tubules in the abdomen. 

Glowworms do have some natural predators, the first and foremost being other New Zealand fungus gnats. There is also a species of wasp, Betyla fulva, which lays its egg in the pupa. When the egg hatches, the larva eats the occupant inside and then pupates. When the pupa opens, the adult wasp emerges. A species of harvestman preys on the luminosa eggs, larvae and pupae, and even the adult flies. A fungal pathogen identified as Tolypocladium sp. (Moniliales) also affects A. luminosa; it gradually kills the larva. Fungus spores are spread by air movement, but since the larvae live out of the wind the spread of spores is limited. Their greatest danger is from human interference. 

Glowworm (Arachnocampa luminosa) in a cave in New Zealand.
1-Nz glowworm.jpg

The photo below is of Arachnocampa luminosa's larval stage. The blue light occurs in a modified excretory organ known as Malpighian tubules. It is this light that attracts flying prey into their snares... 
1-1-New Zealand Glow-Worm.jpg

The larva spins a nest out of silk on the ceiling of the cave and then hangs down as many as 70 threads of silk (called snares) from around the nest, each up to 30 or 40 cm long and holding droplets of mucus. Snares built by forest-living specimens are much shorter, reaching a maximum length of 5 cm due to wind entangling longer snares.
The photos below are of glowworm snares in a dark damp overhanging bank in native bush.
Arachnocampa luminosa NZ glowworms-1.jpg

The photo below was taken at the entrance of an old gold mine in the Coromandel. 1-Glowworms-001.jpg