Julen Lopetegui and Real Madrid was one of those relationships that looked doomed from the very beginning. Three days before the World Cup kicked off in Russia, Madrid announced that Lopetegui, then coach of Spain with a recently agreed contract extension to 2020, would break that contract to join Real Madrid following the conclusion of Spain’s World Cup campaign. This made the Spanish FA president Luis Rubiales so angry that he sacked Lopetegui the next day. The Basque got to take over at Madrid a couple of weeks earlier than he had bargained for.

Madrid’s president, Florentino Perez, had expected to be poaching the respected and successful manager of the national team; instead his new coach was a national joke from day one. At the time this seemed like the worst possible start for Lopetegui. In hindsight his first week in charge was the best spell of his Madrid career. It was the only time he seemed to be wanted.

In July Madrid sold Cristiano Ronaldo to Juventus and everyone waited to see who they would sign to replace the man who had averaged 50 goals a season for the past nine years. On August 29th, Madrid announced the signing of Mariano Diaz from Lyon – a 25-year-old striker with 26 top-level goals to his name. A few days after that, they unveiled their €525 million stadium redevelopment plan. Clearly Perez’s priority at that point was to rebuild the stadium, not the squad. Lopetegui would just have to get on with it as best he could.

Perez was gambling that his team were so good that they did not need investment. They had, after all, won three Champions Leagues in a row. Clearly, Ronaldo was central to all of these victories, but Perez always felt the Portuguese got too much of the credit. He believed Madrid were much more than simply the Cristiano team. Rather than wrecking the team’s attack, Ronaldo’s departure would give others – such as Marco Asensio, Isco and Gareth Bale – the chance to bloom and thrive.

We know now that this was a terrible mistake. The unravelling began with a 3-0 defeat at Sevilla at the end of last month, continued through defeats to Alavés and CSKA Moscow and last week culminated in a 2-1 home defeat to Levante, a match in which Marcelo’s consolation goal just about managed to prevent Madrid setting a new record for the longest scoreless run in their entire history.

Washed up

Lopetegui was already washed up after the Levante game, but with Barcelona next up in La Liga it was felt he might as well be allowed to remain in place to absorb the impact of one final disgrace. Perez might now wish he had acted after all, because the 5-1 thrashing Madrid took yesterday will be remembered by fans of Madrid and Barcelona long after they have forgotten about Lopetegui.

Who knows how bad it could have got for Madrid if Lionel Messi had not been ruled out through injury. As it was, the match brutally exposed Madrid’s weaknesses all over the field.

First, they have no reference point in attack. Perez once hoped that Bale would become a player on the level of Ronaldo. Yesterday Bale, who had fewer touches than any other starter, was mercilessly barracked by the Barcelona fans for the clumsiness of the touches he did take. He can still look like a superhero for Wales, but in tough matches for Madrid he so often looks lost, isolated, not on the same wavelength as his teammates. The lack of connection with the players around him would be worrying enough if he were a new signing, but this is his sixth season in Madrid.

Karim Benzema’s dwindling band of admirers can no longer argue that he would score more goals if only Ronaldo wasn’t there to hog all the chances. As for Isco, he is one of Perez’s favourites, but no amount of presidential admiration can change the fact he lacks the speed to play in a front three just as he lacks the stamina and strength to play in midfield.

In midfield Madrid were mediocre rather than disastrous, with a tired-looking Luka Modric and Toni Kroos struggling to impose themselves on the game for all but a short spell after half-time. But Madrid’s biggest problems were in defence, and they don’t come any bigger than Sergio Ramos.

Now that Ronaldo is gone, Ramos’s status as the biggest player at the club is undisputed. His recommendation was key to the club’s decision to hire Lopetegui, and he has taken advantage of the weak new regime to install himself as the taker of penalties and most of the dangerous free-kicks. Who’s going to tell him otherwise? Unfortunately for Madrid, it looks as though the cult of Ramos has kicked into a truly epic phase just as the defender begins to show signs of decline.

Ramos’s mistakes

Ramos is now routinely described as the best central defender in the world, but in football reputation always lags behind reality. Madrid won the Champions League last year but they conceded nine goals in the knockout phase – more than any other winner since the competition moved to its current format in 2003-4. They got away with this because Ronaldo scored 15 goals in the competition, but even Ronaldo could not score enough to compensate for the 44 Madrid conceded in the league, their worst defensive record for a decade.

It was Ramos’s mistakes that cost Madrid against Sevilla in the 3-0 defeat that started their poor run, and neither did he cover himself in glory when Spain lost 3-2 to England in the recent Nations League game.

Against Barcelona, Ramos presided over a defensive meltdown that began with Madrid failing to notice Jordi Alba’s telegraphed run down the left for the opening goal, and culminated in Ramos standing by and watching the unmarked Arturo Vidal head the fifth for Barcelona. In between, Ramos had chested a ball in midfield down to Sergi Roberto, who immediately played Luis Suarez in to complete his hat-trick.

Remarkably, Ramos’s self-assurance is so bulletproof that after the match, he was entertaining queries from reporters as to whether Antonio Conte’s notoriously uncompromising man-management could work in the context of Real Madrid. Ramos said that managing the dressingroom was more important than high-level tactical knowledge. In other words, what really counts is not whether the coach has good ideas, but whether Ramos approves of him. The Ramos-centric approach might have been good enough to win trophies for Madrid while the club was being carried on the back of a 50-goal-a-season forward. Now those days are gone, it’s starting to look like they might need to rethink the overall strategy.