A federal judge has approved a deal in which a government agency must decide by 2018 whether to include certain animals and plants on the endangered species list.

It is now the job of the U.S. Fish and Wildlife Service agency to decide whether certain animals and plants will be protected under the Endangered Species Act.

The judge's ruling resolves several lawsuits in which environmental groups challenged the way the government handled species on the so-called candidate list for ESA protection, the Associated Press reported.  

The ESA represents a commitment to protect and preserve our natural heritage out of a deeply held understanding of the direct link between the health of our ecosystems and our own well-being, Fish and Wildlife Service director Daniel Ashe said, Environment News Service reported. This work plan will allow the Service to more effectively focus our efforts on providing the benefits of the ESA to those imperiled species most in need of protection.

The government agency was accused of being too slow when it came to approving or rejecting species for the endangered species list.

There is a backlog of hundreds of animals and plants, some of which have been waiting for decades.

One of the plaintiffs in the case was the Center for Biological Diversity. The center's endangered species director Noah Greenwald was thrilled with the judge's decision.

The historic agreement gives species like the Pacific walrus, American wolverine and California golden trout a shot at survival, Greenwald said, the ENS reported. With approval of the agreement, species from across the nation will be protected. Habitat destruction, climate change, invasive species and other factors are pushing species toward extinction in all 50 states, and this agreement will help turn the tide.