The federal government must come up with a critical habitat plan to protect the rusty patched bumble bee, a native to Minnesota and Wisconsin, under a court agreement reached with the Natural Resources Defense Council.

Under the settlement the U.S. Fish and Wildlife Service must submit a habitat plan for the endangered bee by July 31, 2020, and finalize any habitat protections, if deemed necessary, by July 31, 2021.

The rusty patched bumble bee, once common across the central U.S., became the first bee ever listed under the Endangered Species Act in 2017.

“The U.S. Fish and Wildlife Service has violated federal law, again, by not designating critical habitat for the rusty patched bumble bee. This settlement is a step in the right direction to ensure the bee’s survival," said Lucas Rhoads, an attorney for the Natural Resources Defense Council, in a statement. “The Service must now do their part to protect the bee’s habitat or they’ll find themselves in court once more.”

The chubby bee with a rusty patch on its back once thrived in 28 states across the Upper Midwest and East Coast as well as large parts of Canada. But in the past two decades, the bee has disappeared from nearly 90% of its historic range — seen in the past 15 years in only 13 states, including Minnesota and Wisconsin, as well as Ontario.

Experts believe the bee is falling prey to habitat loss, climate change, diseases and, especially, neonicotinoid pesticides — some of the same problems believed to be hurting butterfly populations. Neonicotinoids are a group of insecticides used widely on farms and in urban landscapes for flowers and gardens. They are absorbed by plants and can be present in pollen and nectar, making them toxic to wild bees.

The 2017 decision to use the Endangered Species Act to try to recover the bee's population came after years of calls from conservation groups and scientists to protect the native species. Bumblebees are important pollinators for berries, vegetables, clover and native flowering plants.

Supporters say designating critical habitat provides an ecosystem where endangered species can repopulate and avoid extinction.