On a hot day at dusk, when there's stillness in the air, look to the edge of woods or marshy areas, or across an expanse of lawn. Quick as a blink, there they are: fireflies.

Also known as lightning bugs or glowworms, their tails contain chemicals and enzymes that, when sparked with oxygen, create a bioluminescent reaction. We see a yellowish flash in Minnesota, but in different parts of the country species glow green or orange or blue. Let's shine a little light on these seasonal wonders.

Each of the 2,000 species within the Lampyridae family of beetles has a unique flash pattern. Fireflies light up to attract mates, females waiting on tall foliage and males flying to them. Some females mimic the flash pattern of a different species as a trap, and when a male does arrive, she eats him for supper. A firefly's flashes also warn prey; most insect-eaters know that if it glows, it tastes bad.

Populations of fireflies are dwindling, due mainly to a loss of habitat and increased light pollution that prevents them from getting their signals across. But we can help them survive and thrive with a little advice from Firefly.org.

• Keep your yard dark by turning off exterior and garden lights and closing the blinds at night, making it easier for them to find one another to mate.

• Plant gardens, trees (especially pine) and native grasses to help replace lost habitat. Avoid the urge to over-mow, or leave some areas of longer grass.

• Let logs and leaves rot and leave them undisturbed, as larvae live there.

• Add a water feature to your garden or yard; fireflies thrive near standing water.

• Avoid using lawn chemicals and pesticides; fireflies are nature's pest control.

Welcoming these insects to your backyard invites nature's fleeting magic and sets the table for a showstopping summer.

Let it glow.