Manuel Pellegrini told his players he would see them back in work on 2 January, wished them a Happy Christmas and left the Rosaleda carrying a suit and wheeling his case behind him. It wasn't exactly the way he wanted it but a promise is a promise, and there had been too many of those broken already. Besides, it was worth it. It is rare that you see the Málaga manager squirming, an embarrassed smile briefly flashing across his face, but there it was. The last press conference of 2012; the first training session of 2013. "When are the players reporting back?" Pellegrini was asked. At first he skirted round the question but then he mumbled an answer, shifting slightly in his seat.

"Erm," he said, "January 2".

Ten days' break. Four days more than Zaragoza, three more than Real Madrid, two more than Levante and one more than Sevilla. Only three teams in the whole of La Liga have as many – Barcelona, Deportivo La Coruña and Granada. No one's having more and no one's returning later, but Málaga's players had just earned it. As he departed the Rosaleda, Isco carried the Golden Boy award under his arm, Europe's best player at Under-21 level, and everyone wore huge smiles. "We go off on holiday very happy," Isco said. Outside, the fans were still singing. It had been a great night. Symbolic too.

José Mourinho once famously declared: "I will never coach Málaga"; now, as the singer Alejandro Sanz pointedly noted, "Málaga are coaching you." A lesson was handed out. Pellegrini defeated the club that mobilised the media against him and then sacked him. Málaga had just beaten Madrid 3-2. "It was a fair result," Javier Saviola said. "There were chances for it to have been more," Pellegrini added. He was right, in the second half at least. Isco had controlled the game, scoring a wonderful, characteristic first, opening his body out to place his shot into the far corner. And Roque Santa Cruz came off the bench to score two, the second finished as well as it was made.

It was the first time that Málaga had defeated Real Madrid in 29 years. All the focus was on Madrid. Another fight, another fire, but there was another story: Málaga. Victory took them to within two points of Madrid in fourth place; it also took them to 31 points.

Pellegrini had promised the players that if they reached 30 points before Christmas they could have an extra couple of days' holiday; just as he promised to buy them dinner if they won away to Anderlecht in the autumn. Both times they did their bit; both times so did he. "I didn't want to [give them until the 2nd]," Pellegrini said, "but there you go. I've fulfilled my promise and, although we have a small squad, they have shown a real commitment, both physically and mentally. Beating Madrid after so many years and fighting for next year's Champions League ... it's been a brilliant year in every respect."

On the pitch, at least. In 2012, Málaga qualified for the Champions League for the first time in their history. They then became the best debutant in the tournament, winning their group unbeaten. And now, they go into the winter break in fourth, the team with the best defensive record in La Liga. They have a Champions League place once more. The problem is that it might be worthless. On Friday afternoon, UEFA's Financial Control Body adjudication chamber announced a series of punishments for "significant overdue budget balances". Amongst the eight clubs punished were Málaga, who were hit by a €300,000 fine and banned from European competition for a year, with the threat of a longer ban should they not prove by 31 March that they have satisfied all their debts as part of the Financial Fair Play measures.

The announcement came while Málaga were celebrating a Christmas lunch, a day before their final game of 2012. No one expected it. They cannot understand it either.

Málaga were the next big thing. Bought by the Qatari Sheikh Abdullah Ben Nasser al-Thani, the cousin of the emir, there was talk of challenging Madrid and Barcelona and redeveloping the Rosaleda. Pellegrini was brought in as coach, Fernando Hierro as institutional director. Almost €60m was spent on signings. But midway through last season, the tap was turned off. al-Thani had invested over €150m in total but the club continued to lose money; the money dried up. Players went unpaid, results slipped. Conflicts emerged. There was confusion and silence.

At the end of the season, Santi Cazorla, Ruud Van Nistelrooy, Salomon Rondon and Joris Mathijsen threatened to make a formal complaint against Malaga during a meeting with the president of the Spanish Players Union, José Luis Rubiales. The club reassured the players and a deal was struck to prevent a formal denuncia which could have resulted in automatic relegation to the Second Division B. That deal ultimately involved their departure but for now there was a power vacuum, inertia.

Osasuna and Villarreal complained that they had not received full payment for Nacho Monreal and Cazorla respectively. River Plate complained to FIFA about Diego Buonanotte. Then the former owner Fernando Sanz said he was still owed over €3m for the sale of the club in the first place and the treasury demanded €7m. In the meantime, Málaga could not sign players. But, at first, nothing happened. The silence was baffling, it did not make sense: Málaga had earned that Champions League place, why stop now? What was behind al-Thani's apparent disappearance?

The league and UEFA began to bring pressure to bear. So too the state: under the new secretary of state for sport, the Spanish government had decided it was time to get tough at last. Between them, Spanish clubs owe over €750m, after all. Fans panicked in the dark. The threat was clear: the Champions League place they won could be denied to them. Administrative relegation domestically was not out of the question. Signings were embargoed. All the while: silence.

And then Málaga began to move: al-Thani's representative Moayad Shatat turned up, Malaga's very own Mr. Wolf. And with the support of others within the club, lifelong Malaguistas, they started to restructure the club. Those involved talk of fearing the worse. They could no longer rely on investment; the club had to stand on its own feet. Cazorla was sold for a price that Pellegrini had warned was "a gift" and Rondón was sold too. Van Nistelrooy retired and Mathijsen left. Hierro had already gone; now sporting director Antonio Fernandez departed as well. The transfer embargo was lifted and immediate danger averted. Málaga were into the Champions League, albeit with all earnings embargoed.

"For me it was inexplicable that they sold Cazorla at the moment that they sold him; and the price was absurd," Pellegrini said last week. "For me, it was a poor decision but it was an emergency and luckily they changed their minds on other decisions that they thought about taking. That was why we could continue to maintain a potential in the team."

They did just that and more. Rondón's departure was not the disaster it might have been; Pellegrini already wanted a different type of striker, more mobile, cleverer, and Javier Saviola immediately performed. Weligton returned to the defence, where he was better than Mathijsen had ever been. The injuries of Julio Baptista and Jérémy Toulalan have done remarkably little damage. Francisco Portillo was given greater opportunity. Ignacio Camacho grew. Eliseu kept his head, sometimes. And in the absence of Cazorla, Joaquín and Isco took a step up. Isco looked more committed, more consistent, even a little more svelte. It was as if the responsibility brought the best out of them. A rather malicious poll once asked if Joaquín was a footballer or a comedian; comedian won with 75%, as if being funny was a crime. Now some want him back in the Spain squad, almost six years on.

"The emotional side of things was important and the group reacted well," Pellegrini says, "it was good that we were able to turn adversity into a source of motivation." Unity came through shared experience; they were allies, a collective spirit forged. Tactically too, they look more an more like a Pellegrini team: well-organised, good on the ball, offensive but cautiously so.

The night that al-Thani reappeared, going down to the dressing room to congratulate the players after they beat Milan, Joaquín appeared to sum up the attitude when he apparently pointedly told the radio show Al Primer Toque: "This success is down to the players and the coaching staff." Some were still owed money; another deadline came and went. And yet at the same time, Málaga were getting it right of the pitch too. Bit by bit. "We're out of Intensive Care but we're still not completely cured," one insider put it in the autumn. "The club is stable now; completely different to the situation we lived through in July, when there was a sudden change in attitude and budget. Now, we're living a moment of institutional stability and sporting success," Pellegrini said last week.

Victory over Madrid reinforced that feeling; even UEFA turning up 24 hours earlier had not thrown them out of their stride.

It still might. UEFA released the almost €18m Málaga were due from this year's Champions League but announced that they would not be able to compete in next year's. What the statement from UEFA did not say was why exactly Málaga have been banned. A further statement is expected in January but at the club they say they canot work it out, believing that there is no legal basis.

No one knew the ruling was coming and it comes at a time when Málaga insist that they are now up to date, when al-Thani has invested a further €7m. Osasuna have publicly supported Málaga, saying that they have been paid. Agreements have been reached with Villarreal and with the players and negotiations with Inland Revenue are ongoing, while other clubs have debts that dwarf Málaga's. A club statement described the ruling as "disproportionate and unjustified". They will appeal to the TAS. Fans, meanwhile, are planning protests. Two days ago, they were celebrating a great night, looking forward to two days' extra holiday. Pellegrini and his team went off for Christmas with his team in a Champions League position that they may not be allowed to occupy.

Talking points

• José Mourinho described it as "a technical decision" but no one believed that. Another day, another battle. The Real Madrid manager left the club captain Iker Casillas out of the side to face Málaga – the first time he has been dropped in a decade. Although Casillas later said he could sense that he might not be playing earlier in the week and Miguelito Díaz announced the possibility on Cope Radio on Thursday night, no one expected it. Florentino Pérez found out in the directors' box before the game when, live on air, Canal Plus's Monica Marchante, showed him the team sheet. As he leant forward, lifting his glasses upon his head, the look of surprise said it all. "We were all surprised," Sergio Ramos said as he came off the pitch at the end. "He's the captain and a great goalkeeper."

The decision feels like another chapter in the internal battles that are leaving Madrid on a constant war footing. It is tempting too to interpret it as deliberately provocative from Mourinho; a show of strength that he knew could have huge consequences. Especially the week after the confrontation with a journalist in which he talked about there being "three black sheep" in the squad, and particularly the day after the president appealed for calm, insisting: "those that seek conflict gain nothing." Jorge Valdano, one of Mourinho's greatest enemies, forced out of the club by him, called it "a raising of the stakes ... an exhibition of power, imposing himself on a legend of the club." Guti, meanwhile, said: "It's a challenge to the club and to one of its living legends."

If on top of that, you lose – and if in the process take off Xabi Alonso, Alvaro Arbeloa and Angel Di María – it is no wonder some asked: does Mourinho actually want the sack? Asked if he had thought about resigning, Mourinho responded: "no." But his side are now 16 points behind Barcelona and many of his players are not behind him. Those that are, are brandishing knives. Much of the media had already turned against him but now the pitch is increasing. "And who takes Mourinho off?" asked the cover of Marca.

• Javier Aguirre: unbeaten. After three draws, including that 2-2 at the Bernabéu, he picked up his first win as manager of Espanyol with a 2-0 win over Deportivo. Depor's manager José Luis Oltra is bottom and in trouble. The question now is what the club's most important man thinks of him. No, not the president. Agent Jorge Mendes.

• Leo Messi only scored one. Pah, useless. He finishes the year with 91 goals. Still miles behind Godfrey Chitalu.

• Atlético won again, with the game's only goal scored by the former Oviedo (ahem) striker Adrián. They finish the year in second, seven points clear of Real Madrid.

• Typical. Levante come to town. You go to see them play, to speak to them, to find out how they do it, how they keep on overcoming the odds, to talk to their best player and explain what makes them so good ... and they get hammered 3-0. Rayo Vallecano were hugely impressive again: two of their three goals were real belters. Both came at the end of the ground that is actually an end and not just a wall. But this time it was covered by a banner of protest by fans who are sick of always getting the worst TV slot. It was a huge cartoon, rather graphically depicting a dominatrix with a GolTV screen for a head, whipping her subservient slave. The slave was Rayo's president. "You will play when I say," barks the dominatrix "Yes, my master," replies the president. Rayo begin 2013 as the ended 2012: in the Monday night graveyard slot.

• Imagine your team's shirt with "Dave" written across the front? Well, that's more or less what Real Sociedad did this week. They carried out a draw with their members' names: the winning names became the shirt sponsors for their match against Sevilla. Each player ran onto the pitch with a different name written across his shirt plus the date in which they became a socio. "This is the best sponsor in our history," ran the campaign.

• There was good news for Real Madrid this week. They have re-signed their top scorer on a new five year deal, a player of skill, vision and real talent: the 16-year-old Scot Jack Harper.