ALBUQUERQUE, N.M. (AP) — An appeals court on Friday upheld a lower court’s rejection of two ranching groups’ challenge to a federal agency’s designation of certain riparian areas of Arizona, Colorado and New Mexico as critical habitat of a mouse species.

The U.S. Fish and Wildlife Service in 2016 designated nearly 22 square miles (56.6 square kilometers) in the three states as critical habitat for the New Mexico meadow jumping mouse.

The decision by a three-judge panel of the 10th U.S. Circuit Court of Appeals said a U.S. District Court judge correctly rejected the challenge by two New Mexico ranching groups, the Northern New Mexico Stockman’s Association and the Otero County Cattleman’s Association.

Livestock grazing can damage mouse habitat, and its protected status has prompted federal managers in some areas to restrict access to streams and wetlands.

The appeals court said the Fish and Wildlife Service complied with legal requirements for assessing economic impacts of critical habitat designation, adequately considered the effects on ranchers’ water rights and “reasonably supported its decision not to exclude certain areas from the critical habitat designation.”