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 the European champions, 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... CasemiroSaturday, 27 February 2016 was a major turning point in 44-year-old Zidane's early managerial career.
Real lost their 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 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 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, moved to the Bernabeu from Sao Paulo 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 he 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, derby defeat forced Zidane to rethink, and Casemiro rapidly became indispensable, with his powerful physique, tackling ability and positional discipline giving the team a previously lacking defensive presence in midfield.
A new-found pragmatism - the team that never gives upReal began their winning streak with a 3-1 triumph at Levante, and were five victories into it when the game that would prove to be their turning point arrived: the Clasico at Barcelona on 2 April.
Barca were paying tribute to club legend Johan Cruyff, who had died a week earlier, and they had every intention of marking his memory with another crushing victory over their biggest rivals.
Instead, it proved to be a prototype performance from Zidane's new-look team, who were undeterred by falling behind to Gerard Pique's header and bounced back to win with goals from Karim Benzema and Cristiano Ronaldo.
There was little flair in Real's victory, but the players obeyed Zidane's command - delivered in the wake of the defeat by Atletico - to "run more".
Notably, the French coach delivered the same message in the build-up to the Champions League final against their city rivals in May, urging: "What we have to do is run, run, run and run."
Forget spectacular, attacking football inspired by megastar Galacticos, Zidane was turning his team into a bunch of grafters committed to their defensive duties and increasingly confident in their ability to grind out wins even when not playing well.
Seven of Real's past 19 victories have been secured by goals in the last 10 minutes - most recently the Champions League triumph over Sporting Lisbon which prompted Marca to hail them as "Comeback FC" and state Zidane has "recovered the virtue of never giving up".
Squad rotationAlthough his strongest XI more or less picks itself, Zidane is committed to a policy of squad rotation, regularly emphasising the importance of a group mentality and insisting every player is important.
Every manager says similar things but Zidane's talk is not just empty rhetoric, with his commitment to rotation backed up by statistics.
He has fielded 21 players in Real's four league games this season - and only goalkeeper Kiko Casilla (deputising for Keylor Navas) and Sergio Ramos have started all four.
Furthermore, Zidane has selected five different forward lines in his team's six competitive games, and their 12 league goals have been scored by 11 different players. You can't get much more 'group mentality' than that.
Spain's most famously pro-Real journalist, Tomas Roncero from newspaper AS, this week saluted Zidane by writing: "Zidane leads a squad of 24 players, not 11.
"This squad doesn't just have a plan B, but also a plan C and plan D. I've never seen a Madrid so complete, versatile, and reliable."
That tribute is also, naturally, an unspoken dig at Barcelona, who are routinely accused of being too reliant upon their Messi-Suarez-Neymar forward line and, when the second-stringers started at home to Alaves 10 days ago, lost 2-1.
Calm and assured man-managementNot many managers could leave out a player for months, recall him to the starting line-up, see him score a record-breaking goal and then hear that player declare the manager "will always be my idol".
But Zidane was given that endorsement by James Rodriguez after the Colombia international, making his first start of the season, rifled home the opener in Real's hard-earned 2-0 victory at Espanyol on Sunday.
And it's clear that Zidane, a 1998 World Cup winner with France who became a Real legend with a brilliant volley in the 2002 Champions League final victory over Bayer Leverkusen, is benefitting from the credibility provided by his stellar playing career.
Zidane commands automatic respect - and his aura makes it easier for him to retain good relationships with players he leaves out of the team.
So, too, does his constant reassertion of the team ethic and his commitment to squad rotation - it's much easier for dropped players to stay motivated when they know they have a genuine chance of starting next week.
Considering his penchant for petulance during his playing days, it is perhaps surprising that another quality which has helped Zidane manage Real's egos is his calm and composed personality.
Whether on the sidelines, in front of the media or at the training ground, Zidane looks relaxed and always ready to smile, even maintaining his good-humoured patience when asked, as he has been countless times this summer, whether he was intending to sell James.
Lady LuckIf you ask Barcelona fans whether Zidane is a great manager, they will scoff and say he is a lucky manager.
When asked on social media for his hopes from the Champions League, Barca star Pique ironically replied he would like the kind of campaign enjoyed by Real last season.
"Easy group. Third-placed team in Italy in the last 16 [Roma], eighth in Germany in the quarters [Wolfsburg], fourth in England in the semis [Man City]. Return leg always at home," Pique tweeted.
And it's true that Real - with all those late winners - have enjoyed some fortune during their record-breaking run, most recently when Sergio Ramos avoided a second yellow card for handball at Espanyol on Sunday by successfully pretending the ball hit his face.
Although the "lucky" argument only takes you so far, it's certainly too soon to proclaim Zidane as an unqualified coaching triumph. The season is young and it's never wise to bank on too much stability in the soap opera that is Real Madrid.
Nevertheless, a Champions League title and 16 straight league wins cannot be discounted lightly - and victory over Villarreal would be another step forward in Zidane's coaching career, which is so far threatening to be every bit as successful as his playing career.
Late goals from Cristiano Ronaldo and Alvaro Morata helped the defending Champions League champions survive an early scare by beating Sporting Lisbon 2-1