BOISE, Idaho (AP) — A federal judge has dismissed a lawsuit by environmental groups involving a wolf- and coyote-shooting contest in Idaho as part of a settlement agreement that requires federal officials to notify the groups if another contest is planned.

The agreement on Wednesday follows several years of court skirmishes between the groups and the U.S. Bureau of Land Management involving Idaho for Wildlife's Predator Hunting Contest. Idaho for Wildlife had initially received BLM permission to hold the contest, but that was rescinded in late 2014 following a lawsuit by the environmental groups.

The agreement requires the BLM to notify the groups during the next three years if it receives a permit application at its Idaho Falls district office for another predator hunting contest. A decision on a related lawsuit against the U.S. Forest Service is pending.