Ending a two-year impasse, Mille Lacs County and Mille Lacs Band of Ojibwe leaders announced an agreement Tuesday for the policing of the Indian reservation that both sides hailed as a step to restoring law and order.

The agreement grants tribal police officers authority to work alongside county deputies in three northern townships — Kathio, South Harbor, and Isle Harbor — bordering the south end of Lake Mille Lacs. It restores a power-sharing agreement that existed for 25 years before the county suspended it in 2016 amid concerns about tribal police work.

“The past two years have been tragic and difficult years on the Mille Lacs Reservation,” Mille Lacs Band of Ojibwe chief executive Melanie Benjamin said in a statement.

When the county abandoned the previous power-sharing agreement, the tribal police force of some 32 officers was forced to rely on county deputies for 911 response, transporting people to the county jail, or seeking charges from the county attorney. As a result, fewer people were charged, tribal officials said.

Negotiations for a new agreement stalled last year, and a mediation session was unsuccessful. Gov. Mark Dayton even waded into the fray last October, saying the standoff jeopardized public safety. At the time, Dayton called on both sides to speedily resolve their differences.

A month later, the band sued Mille Lacs County in federal court, asking a federal judge to hand authority to tribal officers to investigate violations of federal, state and tribal law. The lawsuit is still pending, and according to the terms of Tuesday’s agreement, it could ultimately lead to the termination of the new power-sharing agreement.

The agreement also mentions but doesn’t resolve a larger dispute over reservation boundaries. The tribe says an 1855 treaty that set aside 61,000 acres for the reservation is still valid. The county and state say the reservation has since been shrunk to a few thousand acres.