Xabi Prieto grinned. "We all knew what he was going to do," Real Sociedad's captain said. If they did, they were the only ones. For everyone else it was a surprise, and for Diego Alves especially, yet when the moment came there was something almost childishly joyous about it, something that felt right. It was Real Sociedad v Valencia, fourth v fifth, a direct battle for the final Champions League place and la Real midfielder Markel Bergara had described it as the most important match this year. A case could be made for calling it the most important in a decade. Victory would virtually ensure a return to Europe's elite almost 10 years later for a side that had been down to the second division and on the verge of disappearance since then.

Valencia had just pulled one back and they were after another, pushing, pushing. For them, gripped by economic crisis, qualification was a must. Four goals in just over two minutes last week had kept their hopes alive against the other side in the fight, Málaga. They trailed here but an equaliser would make the gap only two points with five agonising weeks ahead and there was hope. From 0-1 to 1-1, 2-1 and then 3-1, it was now 3-2, Jonas getting a header in the 88th minute, and Anoeta was whistling, pleading for the final whistle. Valencia had a corner, sending men forward. It was the 90th minute and everyone was getting nervous. Everyone except the Real Sociedad striker Imanol Agirretxe.

The ball was headed out and away he ran, into space. The pitch opened before him, Dani Parejo chased behind him. Some screamed for him to head to the corner; the worst thing that could happen now was that he would lose the ball and give Valencia another chance. He kept on running, on and on. Until he came face to face with Alves, the Valencia goalkeeper ... when he dropped his shoulder and scooped the ball gently up in the air, over the keeper's head and down into the net. So slowly, so smoothly, so softly, it was like he was playing in slippers. There was time to watch it fall gently into the net: you could have read the text on the side of it.

Agirretxe stood, arms out, grinning. How about that, then? In the stands, they went wild. Over on Canal Plus, the commentator almost started laughing. "Congratulations, kid. You have to be very mad to try that," noted one touchline reporter. "Very mad, or very good."

That'll be very good, then.

It was the perfect end to the perfect performance; class and cool in equal measure. It was fitting, the embodiment of Real Sociedad: a player questioned, doubted, unexpected, lifting the ball into the net. A player from Zubieta, the Real Sociedad academy, who had struggled through the second division and now virtually clinched a Champions League place with a goal that made this his best season in the first division. And he had done so in style, a touch of fun. When the ball nestled in the net, la Real climbed five points clear of Valencia but it's effectively six: they have a 9-2 advantage when it comes to head-to-head goal difference. Their lead over Málaga is also five points, plus a head-to-head goal difference of 6-3. "It's a good advantage to have but we know that it is not yet decisive," Philippe Montanier, their coach, said.

It probably is. It is also some achievement. Back in August one season preview summed up Real Sociedad's aims in two words: "No sufrir". Don't suffer. No more, no less. The best they could hope for was that it wasn't entirely hopeless; the height of their ambition was that 2012-13 would not be too painful. "There can," the preview continued, "be no objective beyond scaring off the ghosts that have haunted them since they returned from the second division and continue to hover round Anoeta."

In early November that prediction couldn't have looked more wrong, but by April it was more wrong. The season opened with a 5-1 hammering by Barcelona and Real Sociedad reached week 10 in 17th place; they had won only three times. They looked like they would suffer. Since then they have been beaten only once in 25 – and that was a 4-3 defeat at the Santiago Bernabéu where they probably should have got more. They were the first team to beat Barcelona, the first team to get any points at all off Atlético Madrid and the last Real Sociedad team to ever win at San Mamés. Never mind suffer, how about enjoy?

They have done it all on a budget that their president calls "middle-low." When Real Sociedad went down, their fan base was maintained: in the third season in Segunda they still had 19,000 season ticket holders. Their rightful place is still the first division, in terms of size, history and social base. Yet their annual budget is still less than €40m a year, compared with over €500m at Real Madrid. Of that €40m, almost €5m a year goes on Zubieta, the academy and club HQ where even the chef is pretty special: he is the Spanish cocktail champion.

Relegation proved a watershed, not least because it brought financial crisis with it. La Real turned decisively to youth – partly out of financial necessity, partly out of conviction. La Real ditched their Basque-only policy when they signed John Aldridge and they ditched their Basque and foreigners but no Spaniards policy when they signed Boris from Real Oviedo in 2001. They say that they could not compete without doing so – Athletic Bilbao have greater financial muscle – yet of their current first-team squad, 17 players were raised through the youth system and only Chori Castro, Claudio Bravo and Carlos Vela cost any money. They are that touch of something extra that they still need.

"Our philosophy was: get back to our origins, start again, follow our ideals, deepen them, be who we are," insisted the president, Jokin Aperribay. A superb generation of players was coming through. The technical secretary, Loren Juarros, joked: "I watched Asier Illarramendi and, with that mane, he reminded me of Schuster ... without it, he does too." To Spaniards, there can be few higher compliments: Bernd Schuster was as good a central midfielder as La Liga has seen. Nor is it just Illarramendi; there's Rubén Pardo too and Iñigo Martínez. All three will be Spain internationals within the next couple of years. Antoine Griezmann, also a youth team product although he comes from across the border, will have a big part to play in France's future.

There were doubts about the coach Montanier but he has found the right formula; Prieto's shift inside and a renewed belief in their technical ability have been decisive factors, but he has also maintained key principles even when some called for his head. "Success," he says, "has to be a consequence of what you do not the sole aim of what you do." That fits too with the mentality of Guipuzcoa, the Basque province of which San Sebastián is the capital. Calm, rational, understated.

Right now, you could make the case for saying that Real Sociedad are the best side in Spain. Certainly the best to watch. They have a mix of Barcelona and Madrid: they can keep the ball and move it, quickly and accurately, speeding up and slowing down as they see fit to control the game and deny the opposition possession; but when they break they are deadly, slick and swift, like Madrid, vertical: Vela, Castro and Griezmann are extremely quick. There is something about Real Sociedad that awakens the child in the spectator: put simply, watching them is fun. A glance at their recent scorelines says much: they've had a 4-2, a 2-2, a 4-1, a 3-3 and a 3-1 in their past eight games alone. The victory over Barcelona was 3-2. And the last time the played Valencia they won 5-2.

Sunday's victory over Valencia, their second of the season, was another example. Not only because they won 4-2 but because of the way that they did it. In a round of games marked by a wrist-slittingly awful Madrid derby and a 1-0 win for Celta over Levante that summed up so much of what is wrong with the final weeks of the season, after a week in which the vice-president of the league admitted that games are bought in Spain and that he has been told of cases but nothing was done and there was no outcry, the Sunday night match was a better way to wrap things up. A brilliant match; just really, really good fun. As la Real games so often are.

"I don't know if this is the most special night," Montanier said, "there have been a few of them."

This was a game with chances at each end and superb goals. Roberto Soldado and Martínez scored lovely goals to make it 1-1. Real Sociedad were fortunate not to have Bravo sent off for handling outside his area but this was a superb performance and a deserved victory. "Was football unkind to Valencia today?" Soldado was asked at the final whistle. His answer was eloquent in its directness and simplicity: "No."

The second goal was the perfect example of their ability on the break, Castro and Agirretxe combining perfectly at speed. The final pass could not have been better weighted; Castro's barely perceptible shift of his body weight, letting the ball run across him fractionally, allowed him to leave Alves out of position and score with a finish that looked far easier than it really was. But it was the fourth that summed it up. When Agirretxe ran through, Real Sociedad's players might have known what he was going to do but everyone else was left open mouthed as he scooped in a unexpectedly fitting finish.

Talking points

• Madrid derby. Come on, you know the drill by now. Crtl C, Ctrl V. It doesn't matter if Madrid play with subs (although Filipe Luís pointed out, not entirely mathematically correctly, that "their subs cost 10 times more than our squad"), or if Atlético get a three-minute lead, it always ends up the same. Another defeat, another bout of depression. And so the wait goes on. 1999 was the last time Atlético won; they have not claimed one victory over their rivals since they returned to the first division. "Have you passed up a unique opportunity?" Diego Simeone was asked. "There will be another one in a few weeks," he said. "And then two more next season, two more the season after that, two more the season after that …"

• At least this "last" game at San Mamés, which was also not the last game at San Mamés, ended in a way that they could remember. Leo Messi came on and changed the match completely, scoring a superb goal into the bargain, but Athletic Bilbao's Ander Herrera got a 90th-minute equaliser to make it 2-2.

• Last week, Javier Aguirre said he would ask his Espanyol players if they wanted to fight for a European place having finally clinched survival. Presumably the answer was "no", then.

• At last! Rubén Rochina scored an 88th-minute winner to see Zaragoza defeat Mallorca 3-2 in a huge relegation battle. It is their first win in 2013, and means they move to second bottom. Mallorca are back on the bottom.

* And, let's just put up a reminder shall we? Here:

Football matches in Spain are being bought, according to the vice-president of the league. Javier Tebas, who is set to take over as president, has admitted that "more than one" player has informed him of games being fixed but defended the league's lack of action until now on the difference between "legal truth" and "actual truth". He also said that clubs have a tendency to close ranks and protect each other when it came to match-fixing. Tebas insisted that the buying of games, considered to be widespread in the final weeks of the season and given the euphemistic title of "maletines" or briefcases, would be his priority upon taking over.

Asked in an interview with the newspaper Marca whether he has personally been told of incidences of match-fixing by players, Tebas responded: "Yes, and more than one. I am not going to put a pistol to anybody's head to make them make a [formal] complaint but I am grateful that they tell me. I have spoken about it with the AFE [the Spanish players' union] and with directors at clubs. There is a kind of defensive union, a kind of misplaced brotherhood. When teams are on the edge, then you get a league where anything goes.

"We have to end that [and] the clubs agree with me. The most important [priority] is match-fixing. If there is a game that is crooked, that means that this is a competition where things are not in order. From the league and the media we're not giving everything that is needed from us. These are complaints being made by Platini and Blatter too, not just mine."

Tebas has been the de facto head of the Spanish league while serving as its vice-president but defended the failure to prosecute a single person nor launch a full-scale investigation. "The problem is that there is a legal truth and an actual truth," he said. "In the league we have to take a step forward in denouncing what is happening. It's isolated [cases], but it happens.

"Any rumour or call in which I am told that something might have happened I will put in the hands of the relevant authorities and with the stamp of the league. It will be passed on to the police and the anti-corruption attorney. We will do all we can to support that process. We will work without limits and with discretion to uncover these cases. We're making progress; in the past it wasn't even commented upon."

Results: Espanyol 0-1 Granada, Málaga 2-1 Getafe, Real Sociedad 4-2 Valencia, Valladolid 1-1 Sevilla, Athletic Bilbao 2-2 Barcelona, Atlético Madrid 1-2 Real Madrid, Levante 0-1 Celta, Real Zaragoza 3-2 Mallorca, Rayo Vallecano 2-2 Osasuna

Latest La Liga table