Just before noon yesterday, Almería coach Unai Emery settled into his seat on flight IB8595 and reached for a copy of Marca. As the plane filled with travellers bound for Madrid, few recognised the smart young Basque buried in the paper. Just as few recognised him an hour later when he visited Valdebebas to catch 20 minutes of Castilla's Second Division B match against Santa Brígida; when he arrived at the Vicente Calderón to witness Atlético's costly draw with Murcia; or when he peered through the rain as Espanyol defeated Getafe 1-0 to climb back into the Champions League places.

When he dashed from the Coliseum Alfonso Pérez and headed for Televisión Española, taking up his seat on the set of Sunday night tackfest "Club de Fútbol" - somehow not dragged down by its wooden reporters, faulty videos, missing footage and pathetic mocked-up press conferences - most people could still have been forgiven for not recognising him. Even if he did look suspiciously like that bloke from Wednesday's Marca - the bloke about to bite into a massive meringue. And yet by then, Emery had become a hero. Virtually unknown beyond a small corner of south-east Spain, but a hero nonetheless - forced to put up with goalie-turned-gobshite Hugo Gatti and handed his 15 minutes of fame.

If on Wednesday Emery had threatened to take a bite out of a massive meringue, on Saturday he woolfed the whole thing down, leading Unión Deportiva de Almería to a high-intensity 2-0 victory over league leaders Real Madrid, cutting the gap at the top to six points, reopening the title race and completing what one newspaper gleefully described as the "greatest night in Almería's entire history".

Hardly surprising, really. After all, officially UD Almería have only existed since 2001 and although their many predecessors, such as Athletic Club Almería and Plus Ultra, go back further, Almería's history really began in 1971 with the short-lived Agrupación Deportiva Almería. More famous as the setting for The Good, the Bad and the Ugly and Conan the Barbarian, Almería has only ever had one team in the first division - and that was 25 years ago. They've never beaten Madrid and never managed more than two successive wins in the top flight. The majority of the city support Madrid, the club's budget is a twelfth the size of Saturday's visitors', they can't fill their 23,000-seater stadium, and they're sponsored by a guy who didn't even win Spain's version of Pop Idol, for Christ's sake. Yet still Almería did what only Sevilla and Espanyol have done all season, goals from Juanito and Álvaro Negredo sending Madrid to their first defeat in 10, ending a run of eight successive victories and leaving Almería splashed all over Sunday's papers for the first time ever.

What made the victory so impressive wasn't the way Almería set about Madrid, denying time to Guti; the way Diego Alves leapt from side to side saving shots, then leapt up again to kiss a picture of the virgin; or the way Álvaro Negredo made Fabio Cannavaro look like a pub player. It wasn't even the fact that Bernd Schuster managed not to whinge or that José Ortíz, the sole survivor from Almería's Third Division days got a run out. No, what was most impressive was that this was no one-off, that victory over Madrid was Almería's fourth in a row and took them into eighth place, just two points off a Uefa Cup slot.

At 36, the youngest coach in La Liga, Emery might have had the backing of a rich president and an ambitious, talented squad, but he's performed a miracle. In fact, he's performed two of them. His father and grandfather both played for Real Unión and he enjoyed some success with Toledo, but in 2004-05 he was at tiny Lorca in the Second Division B when the coach got sacked with the team struggling. Handed the job, Emery immediately retired as a player and took them to the Second Division - the only time they'd ever been there. The following season he carried them to within a single place of primera and when he departed the year after that, Lorca went down. Almería, meanwhile, came up with six weeks to spare.

"Emery," admits one player, "is a colossal pesado (pain in the arse). The players hate him. Training sessions are long and unbelievably boring. Team talks go on forever - he makes you watch videos for hours, with endless replays of corners and free kicks, even goal kicks. It's so dull I've seen people fall asleep. He tells you the same things every week, like you're a little kid, ramming home his point - like the one about an open hand only delivering a slap but a fist, with everyone tightly packed together, being capable of doing real damage. He goes on forever, you get bored stiff, you think it's all bollocks ... but it works. It's so relentless that in the end every single player knows exactly what he wants."

The proof is on the pitch. Almería have scored fewer goals than anyone in the top half but those little details, constantly perfected, have decided matches. They defeated Madrid with two goals from dead-balls - meaning seven of the last nine have come that way, a bewildering variety of clever free-kicks paying massive dividends. And nor is it just the dead-balls, the entire pattern of the team is mechanised: Almería play 11-a-side games without a ball, just to get the movement right. And if the players get bored, the coach never does. He is, says one member of the coaching staff, "sick", a "total geek". Having left his family behind in the Basque Country, when Emery's job is done he goes home to his videos. Or catches a flight to Madrid, takes in a game or three and quietly prepares for another minor miracle.

Results: Almería 2-0 Madrid, Betis 0-1 Deportivo, Zaragoza 1-0 Athletic, Levante 1-1 Racing, Atlético 1-1 Murcia [and with Kun injured], Villarreal 1-1 Mallorca, Valladolid 0-2 Valencia, Recreativo 1-2 Sevilla, Barcelona 1-0 Osasuna [in the 88th minute. Game on?], Getafe 0-1 Espanyol.