ALBUQUERQUE, N.M. (AP) — The U.S. Supreme Court has approved a settlement package designed to rein in groundwater pumping along one of North America’s longest rivers and ensure enough water reliably makes it from New Mexico to Texas, ending a long-running dispute over management of the Rio Grande.In a brief order Tuesday, the court accepted the recommendation of a special master to move forward with agreements first proposed last year by New Mexico, Texas and Colorado. The settlement calls for reducing groundwater pumping along the dwindling river and retiring water rights from irrigated farmland in southern New Mexico. The states held up the proposal as a promise to restore order to an elaborate system of storing and sharing water between two vast irrigation districts in southern New Mexico and western Texas. Researchers have warned that unsustainable use of the Rio Grande — which originates in Colorado and stretches south into Mexico — threatens water security for millions of people who rely on the binational river basin.

Farmers in southern New Mexico increasingly have turned to groundwater to irrigate pecan orchards and chile crops as hotter, drier conditions have reduced river flows and storage over recent decades. That pumping is what prompted Texas to sue in 2013, claiming the practice was cutting into water deliveries.