No sooner had Arjen Robben scored the winner at Wembley than the Spanish grasped the true meaning of his goal. Bayern Munich had won the European Cup, just as Chelsea had claimed the Europa League. This was massive: the greatest, most attractive talents and the fiercest of grudge matches. The biggest rivals would meet in the European Super Cup final in Prague. No, not Chelsea vs. Bayern; José Mourinho v Pep Guardiola. The translator and the ballboy, face to face once more.

The clubs have changed, the backdrop too, but there they stand. Ah, Mr Pep, we meet again. Mourinho was at pains to dismiss suggestions that this was anything other than Bayern v Chelsea but he could not resist what appeared another dig at his adversary, insisting: "It was Jupp Heynckes's Bayern that was the best team in Europe. Now they have a new coach and new players and I'm not sure if they are still as good." And this is a game that fascinates for the men on the touchline as well as the talent on the pitch.

It was only two years but it was presented as if there was something eternal, something good v bad, about a battle that dominated everything: Madrid v Barcelona incarnated in Mourinho v Guardiola. The perfect literary and media storm: competitors with contrasting identities – although Mourinho insisted that Guardiola was not so different to him really beneath the mask – locked together in permanent struggle.

Two years were perhaps best defined by 18 days in April 2011, when Madrid and Barcelona faced each other four times, and above all by the night that Guardiola lost his rag. It was 27 April 2011, the eve of the Champions League semi-final first leg; it could have been a weigh-in before a prizefight, right down to the gauntlet thrown down, the bring-it-on challenge: "Tomorrow at 8.45pm."

Guardiola walked into the press room at the Santiago Bernabéu, looked at the mass of television cameras at the back of the room, asked which was Mourinho's camera, shrugged and said: "I guess they must all be." Then he began his now famous rant. "In this [press] room, [Mourinho] is the puto jefe, the puto amo – the fucking boss, the fucking master. I don't want to compete with him for a moment [for that]. Off the pitch, he is the winner … but this is a game of football."

Guardiola had finally given in and been drawn into battle. Many judged Mourinho to have won; his tactic of getting under Guardiola's skin had worked; the Catalan had lost control. He had, in fact, planned it and his players were grateful that he had spoken out, handing him a standing ovation when he arrived at the team hotel. The following night, Barcelona won 2-0 at the Bernabéu, virtually securing their passage to the Champions League final. Madrid had Pepe sent off.

This time it was Mourinho's turn; his rant, too, would become famous. Pep's puto amo speech gave way to Jose's ¿por qué? speech, in which he accused Uefa of fixing it for Barcelona to reach the final and belittled Guardiola's achievements. "Guardiola is a fantastic coach but I have won two Champions Leagues. He has won [only] one Champions League and that is one that would embarrass me," Mourinho said. "I would be ashamed to have won it with the scandal of Stamford Bridge and if he wins it this year it will be with the scandal of the Bernabéu. I hope one day Guardiola has the chance of winning a proper Champions League, a brilliant, clean championship with no scandal."

It had not always been this way. It might have been affected but there had been something a little hurt in Guardiola's tone the previous night when he had said: "I just want to recall that we were together for four years. I know him and he knows me. And that's what I hold on to."

Mourinho had arrived at Barcelona in 1996 with Bobby Robson. Theoretically, he was a translator – a job description that Barcelona fans used to insult him – but he was so much more: a talented scout, coach and link between manager and squad, fiercely loyal to the players, publicly outspoken, determined in defending his team and attacking Madrid. He famously celebrated one title by chanting: "Today and forever, Barça in my heart!" Among the men he most protected and courted was the club's captain and a former ballboy: Pep Guardiola.

Before one game, the Athletic Bilbao manager Luis Fernández threatened "this second coach who I don't know", warning him that he had better sit down and watch out, because the dugouts at San Mamés "are close together". When the touchline confrontations inevitably began, it was Guardiola who intervened, standing up for Mourinho. And according to the then Barcelona director Marc Ingla, when Mourinho was interviewed for the Camp Nou manager's job in 2008, one of the names he proposed as his assistant was Guardiola. Barcelona chose Guardiola but not as assistant; they turned down Mourinho, even though they recognised that he was the "safe option". It is tempting to see that rejection as the backdrop to all that came next.

In his first season as a coach, Guardiola won everything. In his second, Barcelona were defeated in the Champions League semi-final by Internazionale: Mourinho's Inter. There was tension and accusations; the relationship had definitively gone sour. When Thiago Motta was sent off, Mourinho whispered in Guardiola's ear on the touchline: "Don't think you've won yet"; when the final whistle went, he sprinted across the Camp Nou pitch in celebration.

Two months later, he was manager at the Bernabéu, brought in on a mission to do for Madrid what he had done for Inter. Defeat Barcelona, defeat Guardiola. One of his aims was to wear down Guardiola; to take him on. It was time to present him with a proper battle, off the pitch as well as on it. The atmosphere changed, turned nasty. Mourinho appeared the more comfortable; this was his territory. Guardiola called that run of four clásicos in 18 days "hard"; there was no joy. Zlatan Ibrahimovic later revealed in his autobiography that he had attacked the coach after a game at Villarreal: "I yelled to him, 'You have no balls!' and probably worse things than that. And I added, 'You're shitting yourself about Mourinho!"

Results were mixed but this was certainly a challenge. In the first season, Barcelona won the league and European Cup. They lost the Copa del Rey final to Mourinho's Madrid but they had defeated his side 5-0 in the league – Mourinho's worst defeat on his cv – and knocked them out of the Champions League semi-final. The following season, Barcelona beat Madrid in the Copa del Rey semi-final en route to winning it, but Madrid won the league for the first time in four years, winning 2-1 at the Camp Nou. Having returned to Chelsea, Mourinho recently claimed to have ended Barcelona's hegemony, even though he ended the following post-Guardiola season empty-handed.

Guardiola departed having won 14 of a possible 18 trophies, seven of them in confrontations with Madrid. Against Mourinho's Madrid, his record ran: two seasons, one league, one cup, one European Cup and one Spanish Super Cup. Yet of the four trophies Barcelona had not won under Guardiola, three had been ceded to Mourinho: a European Cup against Inter, plus a Copa del Rey and the league title against Madrid.

Now Mourinho's supporters claimed another victory: Guardiola's resignation. It was not the same without him, as if Mourinho had been orphaned by Guardiola's departure, no longer having someone to confront, and within a year he had gone too. For now, though, victory was his. Some Madrid supporters and some in the Madrid media claimed that Guardiola had gone because he knew he was beaten, because the balance had tipped. Mourinho was the winner. Ibrahimovic was right.

They gloated that Guardiola did not have the stomach for the fight and there was certainly a weariness to the Barcelona coach to which the Portuguese had contributed. Mourinho had waged a war of attrition; now only he was the one left standing, albeit not for long. Guardiola took a year's sabbatical, something that Mourinho pointedly noted: "I would never do."

Some even claimed that Guardiola had turned down the Premier League so as not to confront him any more. Guardiola, they said, had gone to Germany to avoid Mourinho. It did not convince and, if he had, it did not work.

Fear and Loathing in La Liga: Barcelona vs Real Madrid by Sid Lowe is published by Yellow Jersey Press on 26 September