BISMARCK, N.D. — The federal government will pay North Dakota nearly $28 million to settle a lawsuit over the costs of policing massive protests against the Dakota Access oil pipeline nearly a decade ago, the state’s attorney general announced Thursday.

The final settlement agreement’s sum is the same amount a federal judge determined last year after trial. The government also agreed to dismiss all of its appeals and to issue a statement that recognizes “that the people of North Dakota, including, centrally, our law enforcement officers, endured repeated acts of intimidation, violence, property destruction, unlawful conduct associated with encampments established on federal land without authorization,” Republican Attorney General Drew Wrigley told reporters.

“We deeply appreciate those acknowledgments. They’re a long time coming,” Wrigley said, joined by attorneys and investigators from his office.

The settlement closes a years-long legal battle over who should bear the costs of law enforcement response to the 2016–2017 protests near the Standing Rock Sioux Reservation, which drew thousands of demonstrators and resulted in hundreds of arrests. The protests were directed against the Dakota Access Pipeline’s construction under the Missouri River, upstream of the reservation.

The $28 million figure was originally established by U.S. District Judge Daniel Traynor following a trial. The settlement resolves North Dakota’s claims that the federal government was responsible for the law enforcement costs incurred during the months-long protest encampments on federal land.

The agreement also ends the government’s appeals of the earlier ruling. As part of the settlement, the Department of Justice will issue a formal acknowledgment of the conditions that North Dakota law enforcement faced during the protest period.

MSI previously reported that a judge ordered Greenpeace to pay $345 million in a separate Dakota Access-related case, underscoring the broader legal fallout from the pipeline’s construction and the surrounding protests.