MADRID (AP)The Spanish league has significantly raised Barcelona’s spending limit for this season, but only after the Catalan club sold off part of its television rights for the next quarter century and other assets to balance its finances this summer.

Barcelona has been allowed to spend 656 million euros ($659 million) on players and staff for this season, including salaries, according to the spending limits for each club made public by the Spanish league on Friday. That is a massive jump after the club’s spending limit had actually entered negative territory last winter.

To recover from its wretched financial position, the club run by Joan Laporta had to sell 25% of its Spanish league television rights for the next 25 years and other assets this summer for around 870 million euros ($874 million) in cash in July and August.

The club used around 160 million euros ($160 million) to immediately secure the transfers of Robert Lewandowski, Raphinha and Jules Kounde. Another third went toward paying down its massive debt of around 1 billion euros that it accumulated thanks to its high payroll and huge transfer fees paid by Laporta’s predecessor and the impact of the pandemic on revenues.

Barcelona has now returned to second place in the league’s spending limits. Real Madrid tops the list with 683 million euros ($686 million) to spend. Atletico Madrid is third at 341 million euros ($341 million), while Girona and Elche are at the tail end with 42 million euros ($42 million).

However, Spanish league president Javier Tebas said that Barcelona would have to continue to reduce player salaries to maintain this spending limit for next season.

”Either they sell off more assets … or they reduce their wage burden,” Tebas said. ”We will see what could happen as far as the sale of players. It is very difficult or impossible for (Barcelona) to maintain (the same spending limit) for next season.”

The league calculates the spending limits based on the revenues of the club compared to its costs and short-term debt payments scheduled during the coming season.

More AP soccer: https://apnews.com/hub/Soccer and https://twitter.com/AP-Sports