There was a letter waiting for José Ramón Sandoval when he arrived on Thursday morning, strolling into work on Payaso Fofó street, Vallecas. The Rayo Vallecano coach picked it up and saw that it was from the club. His boss. The envelope looked official. Eyeing it carefully, he wondered if this might be the formal offer of a contract renewal for next season. After all, he had taken his team back to the first division nine years later and, with eight games to go, the team everyone tipped to be the first to go back down looked certain to stay there. And then he opened it.

The letter said that Sandoval owed Rayo €188,200 (£156,000). When he agreed to be coach in the second division, Sandoval accepted a contract that allowed the club to sack him without compensation if he did not finish in the top four; in return for that the club promised to pay him a top flight salary if they went up. They would also pay him a bonus. Which they did. Now they wanted it back. The new owners and the administrators claimed that deals signed with the previous owners were not valid; even if they had already been paid. Sandoval claimed that they were mad: he had met his targets and received his bonus. He had been paid before administration had been confirmed. He could no more give that back than they could give back their first division place.

Besides, he had already agreed to a 40% pay cut. And now they wanted more. Here was yet another confrontation between club and team. Owners and administrators versus players and staff. In the week in which his captain had been up in court against the club, Sandoval had no choice. "This is a circus," he said. "There is no way that they are going to beat this club, its players or its fans." It was time to go on strike. Not just any strike but what Sandoval called a "Japanese strike". According to the Spanish legend, a Japanese strike is when the workers go in and perform better than ever before, thus increasing their output so much that the business cannot possibly sell all its produce and prices drop. In short, prove your point by proving your worth.

And boy did Rayo prove it. On Saturday evening, to a backdrop of fans chanting Sandoval's name and chanting for the owners to leave the club, Rayo defeated Osasuna 6-0. That's six-nil. Their highest ever score. In a game in which they hit the post twice and in which Osasuna's goalkeeper was their best player. A game which took Rayo 12 points clear of the relegation zone with just seven matches remaining. This morning they have reached the psychological barrier of 40 points – although relegation has been closer to 42 or 43 in recent seasons – and sit just three points off a European place. And all on a budget that's under €20m a year. It is a miracle.

"A miracle?" says Sandoval. "Is it bollocks!"

Sandoval bangs his fist against the wall. The picture of his star player comes tumbling down, bringing a puff of plaster with it, and lands on the head of the man sitting next to him. Sandoval tuts, reaches for the floor and, with thick hands, picks up the pin and the clip-frame with its picture of Miguel Pérez Cuesta "Michu" celebrating a goal, hair wild, screaming. He brushes the front of the frame with his sleeve, eyes the dent, and hangs it up, as crooked as it is insecure, rolling his eyes. Michu's picture looks out across the room again: the midfielder no one had heard of and no one has ever paid for who is now the highest scoring midfielder in the country; the man who has scored more goals this season than any Spaniard other than Roberto Soldado.

Michu, says Sandoval, is the image of the team: hard working, humble, determined, daring. The image of his image tumbling is the image of the team too. The cheap frame, the holes in the wall, the crooked pin. Sandoval's office is not really an office; it is a dressing room at the back of the training ground. It might as well be a broom cupboard, a cell. There is one tiny little strip window, high up. Sandoval is a big man and he barely fits, he is also one of those men that occupies everyone else's space too, hitting your arm constantly to reinforce his points every time he makes a point. And that is often. Yet there are three of them in here - and every couple of minutes someone else comes in.

Laptops are open on the desk, a wire dragged dangerously across the room at head height and connected to the television which hangs from the other wall. No one is stupid enough to sit underneath. On the screen are stats and plays, dissected, compared, contrasted and computed. There are spreadsheets on the table and diagrams on the walls. Every action, every minute, accounted for. Proof that Rayo Vallecano run further than anyone else in the league; preparation for injury prevention. This is not a miracle; it is called planning. Statistics show that the average player only gets two or three minutes contact with the ball every game. If those two minutes consist of kicking it as far away as possible, the frustration is even greater. So Sandoval encourages them to play, to enjoy it: he repeats over and over on the need to eradicate fear of failure. Players must dare to try things. They must dare to attack too.

Against Barcelona, one of Pep Guardiola's assistants whispered to him: "All these coaches who say they're going to come here and attack … none of them ever do. You lot actually did."

Conviction and convenience lie beneath that decision. Sandoval knows that if his side is likely to lose anyway – and he is realistic enough to know that against Madrid or Barcelona they are – he might as well create a good sensation around the game. The logic is simple: if you tell a player like José María Movilla, the 37-year-old club captain that he is going to play out the last years of his career defending and getting bored, he will go elsewhere. Tell him he will play a bit and, even when he loses, he will appreciate it. For other players, more of the ball means an increased market value. For the coach too: a losing coach who is brave gets feted more than the losing coach that defends, especially in Spain. Rayo lost 6-2 at the Bernabéu and the focus was on the six. The video he proudly paws over shows his side pushing Barcelona back into their own half.

So he pushes them forward. Dividing the pitch into seven lines, Sandoval builds a side that presses and runs; that throws men forward. There is no grey area, no caveats, it is all black and white. They score loads and concede loads. But they enjoy it. And they score more than they concede. It is like a bullfighter, he says: either you leave through the puerta grande – out the main gate and on the shoulders of the fans, a hero. Or you leave through the infirmary. Kill or be killed.

Not that it is kamikaze. The preparation is impressive. The sheer depth of material. The detail in the videos, the conviction with which they talk; the way that moves are mechanised. At every game, Sandoval has an assistant in the stand taking photos of the match, showing players' positions. The photos are send down to the bench for analysis and action.

The technical staff set it up themselves and they paid for it all themselves. Rayo couldn't pay for it. They couldn't pay their players. They can't pay for players either. During the winter window, Rayo allowed on-loan Jordi Figueras to leave – deliberately stalling to the end of the window because that way they got to use him for four games more. In the meantime, they brought in Joel, Diego Costa, Emiliano Armenteros and Jorge Pulido. All of them came on loan or for free – most of them paid for by the clubs that own them – and all of them have been vital: Diego Costa, persuaded that he would kick start his career in Madrid, has scored six times in eight games and proven the perfect associate for those around him. Sandoval describes him as the best striker in the world. Joel has given them security in goal.

In fact, Rayo can't even pay for players to travel. When they went to play Real Sociedad, they went by bus. When the journey went beyond five hours, Sandoval asked what was going on. This was slow, even by the normal standards. The bus driver eventually admitted that he had been told to stay off the toll roads. It cost too much. Sandoval ordered a detour and at the next booth pulled out his own wallet. Every year he takes his players on pre-season to Pozoblanco. It is cheap; he knows the hoteliers and the restaurants. From there they went to Italy for a game; they had two hours sleep beforehand – on physio tables in the dressing room. Pozoblanco is also scene of Spain's most famous death in the afternoon. It was there, in the province of Córdoba, that Paquirri was killed by Avispado. Sandoval says he is trying to finally bury the black legend that follows the town.

So far he is succeeding. This week Sandoval got a letter. This week was a microcosm of the extraordinary success of this club. There is something proper about them being poor; after all, they are Spain's left-wing club, the neighbourhood team, and they have made a virtue out of their position; there is unity in adversity. Unity in scarcity, too. Method in the madness. Sandoval, who has only been a professional for two years, began his career in Madrid's regional leagues, washing the kit, buying the drinks, collecting the squad and driving them around, has built common cause with his players – against the club. Last year against the Ruiz-Mateos family; now against the new owner Raúl Martín Presa and the administrators. But always with his players.

He is particularly proud of the video that he put together at the end of last season on the eve of Rayo's decisive game for promotion. He and his assistants went round the players' houses and secretly filmed messages of support from their wives and children: Sandoval's No2 hid out in a player's garage for over an hour; he had been in the living room with his wife when the player came home earlier than expected. When the video was finally shown on the team bus in the way to the game, they were in tears. That was then, this is now. This week they went on strike. One out, all out.

Talking points

• 0-0 makes it sound rubbish. In fact, it was brilliant. A game that had it all. Tension and intensity, speed, quality and a breathlessness that left you exhausted just watching it. It swung from one end to the next and back again. The ball fizzed about. It had 33 shots from Real Madrid – the third most from any team this year. And yet still had no goals. Not least because it also had bad misses, close shaves, five against the posts and countless astonishing saves from Iker Casillas and Vicente Guaita. The draw means that Madrid have now drawn three of their last five while Barcelona have won five in a row. Barcelona were 4-1 winners in Zaragoza. Lionel Messi got two and Pedro one but the star was Carles Puyol who ran to the side of the pitch with a cut head, pointed to where he wanted the stapler, didn't even flinch, ran back on again and immediately scored the equaliser. The lead at the top is down to four points. Hay liga!

• "If you want to compete in Formula One you need to have a Formula One car," said a Javier Clemente that did not even have his normal feistiness. Just a whole lot of resignation. Sporting Gijón do not have that car. They barely have a rusty old bike these days. That at least was the message that Clemente was keen to get across. The blame, in short, lies elsewhere. And the squad is simply not good enough. Which it probably does and it probably is not, but there was something a little tawdry about the way that Clemente talked as if it was nothing whatsoever to do with him. Sporting were beaten 2-0 by Getafe and remain bottom, seven points from safety.

• Levante. Wow, wow, and wow again. They beat Atlético 2-0 in the midday sun and climbed level with Valencia (until Valencia's draw against Real). They occupy fourth once again – although Málaga can and probably will take it from them tonight.

• Athletic beat Sevilla 1-0 … and it's now almost certain that Fernando Llorente and Athletic will be top the tables for headed goals for the third season in a row. It might have only finished 1-0 but this was another belter. And that hint of tiredness seems to have gone.

Results: Espanyol 2-2 Real Sociedad, Rayo 6-0 Osasuna, Getafe 2-0 Sporting, Zaragoza 1-4 Barcelona, Betis 3-1 Villarreal, Levante 2-0 Atlético, Mallorca 0-0 Granada, Athletic Bilbao 1-0 Sevilla, Real Madrid 0-0 Valencia. Monday: Málaga-Racing.

Latest La Liga standings.