Found this hard, foam-like brown structure attached to a fence post in the backyard. I was about to scrape it off but hesitated. What is it?

offers protection from the elements and predators, such as a dense shrub or a sheltered part of your garden.
To relocate the egg case, gently cut the twig or branch to which it is attached, taking care not to damage the ootheca itself. Secure the egg case in its new location using soft ties or string, ensuring it remains upright and undisturbed. This careful relocation will allow the mantises to hatch successfully and continue their beneficial role in your garden.
9. Why Gardeners Love Praying Mantises (And You Probably Should Too)
Gardeners value praying mantises for their role as natural pest controllers. These insects help manage populations of aphids, caterpillars, and other pests that can damage plants and crops. By maintaining a healthy population of mantises, gardeners can reduce the need for chemical pesticides, promoting a more sustainable gardening approach.
In addition to their practical benefits, mantises are fascinating creatures