When Zinedine Zidane was appointed Real Madrid manager in January, the Spanish giants were in disarray.
Rafa Benitez's ill-fated reign had left Los Blancos trailing both Atletico Madrid and Barcelona in La Liga, with points dropped in four of their previous eight games and memories still fresh of a humiliating 4-0 home thrashing by Barca.
Now, less than nine months later, not only are Zidane's Real reigning European champions, but they are also on the verge of breaking La Liga's all-time record for consecutive victories.
Sunday's 2-0 triumph at Espanyol was the 16th straight victory for Zidane's men, who ended last season just one point behind champions Barca after winning their final 12 games. This season they have established early control of top spot with maximum points from four games.
That winning streak is a Real record and also equals the best winning sequence in Spain's top flight, achieved by Pep Guardiola's all-conquering Barca in 2010-11.
And they have the chance to beat that on Wednesday with victory over Villarreal at the Bernabeu.
So, how has Zidane done it? Not in the way you might have expected.
Cometh the hour, cometh... Casemiro
Saturday, 27 February 2016 was a major turning point in 44-year-old Zidane's early managerial career.
Real lost their local derby at home to Atletico 1-0, jeered off by dissatisfied fans who felt the team had failed to progress since Benitez's exit.
Until then, Zidane had shoe-horned as many attacking players into his line-ups as possible in an attempt to fulfil his pledge to deliver the kind of exciting, free-flowing football associated with his own playing days.
It wasn't working. The forwards were getting in each other's way and the lack of defensive instincts in midfield was making the team vulnerable, brutally exposed by the way Atletico strolled unchallenged through the centre of the pitch for Antoine Griezmann's match-winner.
Zidane knew that something had to change - and that something was the introduction of defensive midfielder Casemiro, the low-profile Brazilian who had previously only played 23 minutes under his management.
Casemiro, 24, originally moved to the Bernabeu from Sao Paolo in February 2013, making his debut under Jose Mourinho in a 3-1 home win over Real Betis two months later.
But Carlo Ancelotti sent him on loan to Porto for the season in the summer of 2014, then was largely left on the bench by Benitez and initially by Zidane, with both managers compromised by the pressure to field more flamboyant, attacking talents.
However, that derby defeat forced Zidane to rethink, and Casemiro has rapidly become indispensable, with his powerful physique, tackling ability and positional discipline giving the team a previously lacking defensive presence in midfield.