The frenetic last days of European soccer’s midseason player trading market — that whirlwind of spending and sales known as the January transfer window — are always full of drama. Rumors fly. Deals are made. For most clubs, the final hours, which arrived Tuesday, are spent engaged in last-minute haggling over the prices for new players.

At FC Barcelona, the Spanish club trapped in a yearslong financial crisis, the close of this year’s window was even stranger than usual: While most of its rivals scoured the market for players, Barcelona went to court to keep hold of one of its own.

The crisis was of the club’s own making. Having spent heavily on new talent last summer despite repeated warnings that its spending violated league cost controls, Barcelona was told by the Spanish league that it could not register any new players until it could find savings or new revenues. That did not stop the team from offering a new contract to Gavi, a prodigiously talented teenager who is one of the club’s most valuable assets.