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?

ootheca helps to ensure that the emerging mantises have immediate access to food sources such as small insects. By placing the egg case in sheltered, yet open environments, the female mantis increases the likelihood of her offspring’s survival once they hatch in the spring. Keeping an eye out for these egg cases can help you understand the distribution of praying mantises in your garden.
5. Is It Safe? Why You Shouldn’t Scrape Off a Mantis Egg Case
While it might be tempting to remove an unfamiliar structure from your backyard, it’s essential to recognize the ecological role of a praying mantis egg case. These egg cases are harmless to humans and pets, and their presence indicates a healthy, balanced garden ecosystem.
Scraping off or destroying a mantis egg case not only disrupts the life cycle of this beneficial insect but also removes a natural form of pest control from your