LOS ANGELES - The harlequin ladybird was once a stalwart ally of greenhouse growers around the world. Native to Japan, Korea and other parts of eastern Asia, the bright red ladybugs were prized for their aphid-eating abilities - until they caused serious declines in other ladybug populations.

Now researchers have discovered the harlequin ladybird's secret weapon: a deadly parasite that lives harmlessly in its body but kills other species with abandon.

The findings, published this week in the journal Science, demonstrate how things can go awry when a foreign creature is introduced into an ecosystem, even when done with the best intentions.

Ladybugs are beloved by humans and are valuable to gardeners, who deploy the spotted beetles to eat plant-munching aphids rather than spray their shrubs, flowers and crops with harsh chemical pesticides. It's a prime example of an environmentally friendly agricultural practice known as biological control.

But one particular ladybug, Harmonia axyridis, has proved to be a two-faced friend. These bugs gobble up aphids at jaw-straining speeds but spread like wildfire once they escaped the greenhouse, quickly taking over native ladybugs' turf in large parts of Europe and North America, among other regions.

In Europe, swarms of the pests have started taking wintertime shelter in houses, said study co-author Heiko Vogel, a biologist at the Max Planck Institute for Chemical Ecology in Germany. Vogel's own mother's residence has been plagued by the beetles, which can fly through windows, slip under carpets and burrow into any crevice a human home has to offer.

"Thousands of beetles -even if they are nice-looking - crawling into your house is not fun," Vogel said.

Scientists aren't sure why some species are able to thrive and dominate when introduced to a new environment. In extreme cases, the invaders wipe out the resources of native predators and throw the ecosystem wildly out of balance. The Harmonia ladybug has been studied for years, but scientists hadn't uncovered many clear answers that explain their success.

When researchers examined the Harmonia beetles' blood, they found extremely high spore counts of a parasitic, single-celled fungus related to Nosema thompsoni. The counts were so high that they thought they had made a mistake.

With so many spores in their hemolymph, "you should be dead," Vogel said. But his team found the same high levels in hundreds of individual beetles. The researchers soon realized that this must be the key to the Harmonia beetles' success.

Somehow, their immune systems had managed to tame the spores - they weren't eradicated, but remained in a handy, inactive state. Then, when gobbled by another species of ladybug, the spore would infect - and perhaps spread through the native population.