MADISON, Wis. (AP) — Gov. Scott Walker’s administration announced a deal Tuesday to end a long-running dispute with the Forest County Potawatomi Tribe, an agreement that cuts the state’s liability by half if a casino opens near the tribe’s existing facility in Milwaukee.

The deal would reduce from $500 million to $250 million how much the state would have to refund the Potawatomi if a casino opens within 30 to 50 miles of the Milwaukee casino and the existing facility loses money as a result.

The Potawatomi have fought for more than 15 years and two governor’s administrations, including the past three years in federal court, over what would happen if a new off-reservation casino was built by the Menominee Nation in Kenosha. That is just over 30 miles away.

Walker rejected a proposal in 2015 for an $800 million Kenosha casino at the former Dairyland Greyhound Park dog track that was to be a joint venture between the Menominee Tribe and Hard Rock Casino. Walker cited the potential risk to taxpayers because of the hundreds of millions of dollars the Potawatomi may be refunded as the reason for rejecting it.

The deal Walker reached with the Potawatomi was signed on Friday and released by Walker’s administration just over a month before he leaves office. The Bureau of Indian Affairs has 45 days to take action on the amendment once receiving it.

Walker’s Department of Administration Secretary Ellen Nowak said she briefed Gov.-elect Tony Evers’ transition team on the amendment. Evers’ spokeswoman, Carrie Lynch, had no comment.

Under the deal, the Potawatomi could withhold up to $250 million in payments to the state if a new casino is approved. An arbitration panel in 2014 would have allowed for $500 million payments to the state to be withheld. The Bureau of Indian Affairs rejected that amendment in 2015.

The Potawatomi sued in federal court, but its challenge was rejected in September.

Under the new deal, the Potawatomi could recoup a maximum of $250 million in payments if a new casino is built between 30 and 50 miles away that results in revenue losses at the Milwaukee casino. There is an outright ban on any casinos being built within 30 miles of the one in Milwaukee.

The deal would run through 2031.

Forest County Potawatomi Attorney General Jeff Crawford applauded the agreement in a statement, saying it will “clarify the obligations” made between the state and tribe in a 2005 gaming compact. Crawford said he looked forward to working with the Bureau of Indian Affairs on its final approval.

Walker’s Department of Administration spokesman John Dipko also praised the deal.

“Ultimately, this amendment resolves an issue that has existed since 2003 in terms that are favorable to Wisconsin’s taxpayers,” he said.

The original compact was negotiated by former Democratic Gov. Jim Doyle.

Earlier this month, four of Wisconsin’s eight members of Congress sent Walker’s administration a letter calling for a “swift and successful conclusion” to the negotiations, saying not having a deal in place created “more risk and uncertainty” to both taxpayers and the tribe.

That letter was signed by Democratic Reps. Gwen Moore, Mark Pocan and Ron Kind and Republican Rep. Sean Duffy.