Potentially capping more than a decade of litigation in Washington, the government on Tuesday agreed to pay $680 million to a class of American Indian farmers and ranchers who alleged the U.S. Agriculture Department’s loan program was discriminatory.

Justice Department officials and attorneys for the plaintiffs announced the settlement Tuesday at a hearing in the case in the U.S. District Court for the District of Columbia. Last week, the attorneys in the case said a settlement was near.

Senior DOJ officials, including Assistant Attorney General Tony West of the Civil Division, who participated in negotiations, attended the hearing. Lead plaintiff Marilyn Keepseagle of North Dakota was also in court.

“It’s a good day,” West said. “I think the administration was clear that they wanted to turn the page on these cases.”

The proposed deal, which is still pending formal approval of the court, provides $680 million in compensation to potentially tens of thousands of farmers. Lead plaintiffs lawyer Joseph Sellers of Washington’s Cohen Milstein Sellers & Toll said it’s too soon to predict the number of potential claimants. The deal also includes $80 million in debt relief.

The plaintiffs attorneys — including Jenner & Block partner Paul Smith and Anurag Varma of Patton Boggs — agreed in the settlement to argue for between about $30 million and $60 million in legal fees. David Frantz of Washington’s Conlon, Frantz & Phelan and Sarah Vogel of Bismark, N.D., are also counsel for the plaintiffs. Sellers said the presiding judge has the final say on fees.

The case was filed in 1999 and the attorneys involved in the dispute have taken more than 100 depositions, reviewed tens of thousands of documents and spoken with more than a thousand American Indians. Judge Emmet Sullivan, who presided over the hearing Tuesday in a crowded courtroom, called the deal historic.

At the end of the brief hearing, a smiling Sullivan came down from the bench and shook the hands of the attorneys and the three plaintiffs who attended the hearing.

The settlement sets out two tracks for class members. Under one scheme, which requires a limited showing of discrimination in the loan process, a class member’s compensation is capped at $50,000. The second track is a more rigorous one and includes a cap of $250,000 in damages. The standards in the second track are akin to those a plaintiff would face in a trial on the claims.

An expert for the plaintiffs estimated the economic damages to American Indian farmers and ranchers between 1981 and 2007 at $776 million, court records show.

The settlement also establishes a federal advisory committee called the Native American Farmer and Rancher Council that attorneys in the case said will provide a forum to help the government improve loan services to American Indian farmers and ranchers. Sellers said it’s the plaintiffs’ hope the deal ushers in what he called a “new social contract” between the government and American Indians.

President Barack Obama on Tuesday afternoon issued a statement praising the settlement, saying that the government is taking “an important step forward in remedying the USDA’s unfortunate civil rights history.” In a statement, Attorney General Eric Holder Jr. praised the agreement, saying it will allow American Indian farmers and ranchers to “move forward and focus on the future.”

The settlement does not require congressional authorization. The compensation will come from the judgment fund that the Justice Department administers.

In his statement, Obama urged Congress to act on two proposed settlements in separate suits that would resolve claims among black farmers and a class of American Indians who are challenging the management of Indian trust accounts and resources.

The lawyers in the Keepseagle case are expected to return to court Oct. 29, when the deal will be up for preliminary approval.