Piles of millions upon millions of dead insects that stained beachgoers' feet in southern Maine last summer were the end result of an exploding population of an invasive pest slowly killing the region's native hemlock trees, according to new research from state and federal scientists.

Alarmed residents reported a strange black substance that stained the bottom of their feet while walking on beaches in Wells and nearby coastal towns last year. Scientists quickly identified the odd stuff as the collective corpses of unidentified winged insects, which yielded a black ink-like substance when crushed.