A Spanish court has ruled that La Liga should allow Barcelona to register Gavi as a first-team player rather than block the move.

La Liga rejected an attempt from Barcelona to register Gavi as a first-team player last week due to the club’s dire economic situation.

Gavi, who signed a new contract in September, was previously listed as an academy player.

Barcelona have been unable to add any new contracts on their wage bill due to La Liga’s salary caps.

However, a court has ruled in Barcelona’s favour and instructed La Liga to allow Gavi to be registered.

A statement from Barcelona read: “Today the Nº10 Commercial Court in Barcelona has made a decision agreeing the adoption of the unusual, provisional measure consisting of “urging the Spanish Football League (LFP)” to do all that is necessary so that the player Pablo Paez ‘Gavi’ can be registered as an FC Barcelona first team player before the close of the winter transfer market at 12.00am CET.

“The decision comes following a request made by FC Barcelona last Friday, in light of the refusal of the corresponding body of the LFP to accept the player’s registration despite the Club considering that all necessary requirements had been met to do so, just as the Court has decided provisionally.

“The decision recognises the authority of the and considers there is a principle of legitimacy in FC Barcelona’s claim and that the failure to register the player before the end of the transfer window would imply the players free agency and therefore cause serious, irreparable damage to FC Barcelona.

“La Liga has been notified of the verdict arrived at by the court and the player can now be registered as a first-team player.”

La Liga may appeal the decision.

Gavi will wear the No. 6 shirt which was worn by current Barcelona head coach Xavi during most of his playing time at the club. Gavi previously wore the No. 30 shirt.

Speaking about Gavi, Xavi said: “The priority is registering important players like Gavi.

“We can register him which is very important. I don’t see him changing club as well. I see him happy here. We had a goal which was to register Gavi and we achieved it”.

Barcelona play Real Betis on La Liga on February 1 as they look to move eight points clear at the top of the table from Real Madrid, who play Valencia on February 2.

Explaining why La Liga tried to block Gavi’s registration, La Liga president Javier Tebas said: “The issue of not registering Gavi comes as a consequence of [the contract] taking effect next season.

“For next year, [the registration] can be denied because Barca has a deficit of more than €200m (£176.3m) for next season. It doesn’t seem appropriate.”