The Golden State Warriors must pay the city of Oakland and Alameda County nearly $50 million in outstanding debt accrued during renovations to the Oakland Arena in the mid-1990s, the California Supreme Court ruled last week.

The state’s high court rejected the Warriors’ appeal last Wednesday in the NBA franchise’s legal battle with the joint powers authority, run by Oakland and the county, that operates the arena.

The city and the county issued more than $140 million in bonds to help pay for the renovations on the understanding that the Warriors would help repay the debt.

However, the franchise attempted to argue that it was no longer responsible for repaying the debt once it relocated from Oakland to the Chase Center in San Francisco.

“It’s time to pay back the local governments that fulfilled their agreement to renovate the arena and poured their hearts and souls into supporting the team and yet had to spend years fighting to finally and fully win this battle and justice,” Oakland City Attorney Barbara Parker said in a statement.

The Warriors must now pay back the debt as well as the more than $1 million in legal fees accrued by the city and the county.

“While we are disappointed in the Supreme Court’s decision to deny our petition, we will, as we’ve always indicated, pay the debt obligation in accordance with the ruling,” the Warriors said in a statement.