Deportivo la Coruna have avoided a second relegation in as many months after club president Augusto Cesar Lendoiro finally reached a compromise with the playing staff, just minutes before the deadline.

The Galicians had until 11pm on Wednesday night to thrash out an agreement, or else face relegation to the Segunda B, Spain’s third tier – which could have spelled the end for the debt-ridden club.

The dispute was over unpaid wages owed to the players since the beginning of the year, when Depor went into administration. And as LFP (Liga de Futbol Profesional) president Javier Tebas explained to local newspaper La Voz de Galicia, that would have meant a second relegation in two months.

"Once the door closes (on July 31), the rules are very clear and if there are still claims from players for unpaid wages we can’t do anything, the rules have to be applied," said Tebas.

Luckily for Deportivo the dispute was resolved in time and one of Spain’s most historic sides will remain in the second tier.

However the northerners do have a difficult season ahead as they look to win promotion back to the top flight, with debts of more than €150 million hanging over them.