Real Madrid overcame an early blow and were made to toil after half-time for a 3-1 LaLiga win at Leganes.
The victory moves Zinedine Zidane's reigning champions up to third in the table above Valencia, although the hosts struck first as defender Unai Bustinza claimed his first senior goal.
Cristiano Ronaldo was given the night off by Zidane and, with Gareth Bale starting on the bench, Casemiro assumed the unlikely role of being Madrid's creative driving force.
The Brazilian midfielder created the 11th-minute equaliser as Spain winger Lucas Vazquez continued his impressive recent form and converted a glorious winner before the half hour.
Madrid shipped three goals in Sunday's win at Real Betis but Zidane was grateful to see Sergio Ramos marshalling a more robust backline as 13th-placed Leganes probed without reward during the second period, and the Madrid captain made sure of victory by coolly dispatching a penalty in the final minute.
The European champions are still seven points shy of Atletico Madrid in second and 14 behind leaders Barcelona.
1 - Casemiro has both scored and assisted in a same game for Real Madrid for the first time ever in all competitions. Crucial. pic.twitter.com/meLBxRRyaN— OptaJose (@OptaJose) February 21, 2018
Despite the likes of Toni Kroos, Luka Modric and Marcelo being out through injury, Zidane still elected to rest Ronaldo and first-choice goalkeeper Keylor Navas.
Madrid made a lackadaisical start and Navas' replacement Kiko Casilla was picking the ball out of his net in the sixth minute.
Gabriel Pires flicked on a left-wing corner at the near post and, after seeing his initial attempt saved, Bustinza flung himself towards the ball, taking Theo Hernandez's clearance on the top of his head to net an unusual diving header.
Madrid's response was impressively swift, with Casemiro intercepting a poor clearance and feeding Karim Benzema before improvising a flick from Mateo Kovacic's pass that allowed Lucas to clip a precise finish across Ivan Cuellar.
Casemiro was again at the heart of things when Madrid took a 29th-minute lead – this time providing the finishing touch himself after exchanging passes with Benzema and accepting Lucas' assist to crown a glorious one-touch move.
Madrid were comfortably on top as the half wound down, with Benzema almost heading a third from Lucas' cross.
Leganes impressively got themselves back on the front foot during the early stages of the second half – Asier Garitano's double switch, sending on Ruben Perez and Martin Mantovani in place of Dimitrios Siovas and Gerard Gumbau, rewarded with a spirited showing.
Tito slotted a pass down the Madrid left to Nabil El Zhar and Claudio Beauvue got on the end of his low cross to force a point-blank stop from Casilla.
El Zhar had a penalty claim following an untidy challenge from Kovacic rejected – the infringement did appear to take place fractionally outside the area – and Madrid continued to do more work in their own half than they would have liked.
Bale came on 15 minutes from time, curtailing an industrious and accomplished display from the much-maligned Benzema.
The Wales international almost picked out the bottom corner after springing the offside trap, but it was Ramos who grasped the ball and made no mistake when Diego Rico bundled Kovacic to the floor.
Key Opta facts:
- Casemiro has both scored and assisted in a same game for Real Madrid for the first time in all competitions.
- Lucas Vazquez is the player with most assists in LaLiga in 2018 (five), alongside Lionel Messi.
- Only Cristiano Ronaldo (10 goals and 2 assists) has been involved in more goals for Real Madrid than Lucas Vazquez (4 goals, 6 assists) in 2018 in all competitions.
- Real Madrid have taken more penalties than any other LaLiga side this season in all competitions (12, 11 scored).
- Sergio Ramos has scored in three consecutive LaLiga away games (three goals) for the second time, the first since September-Octtober 2007.
- Real Madrid conceded their fastest goal in LaLiga this season (five minutes and four seconds).
|Kovac, Robben praise Augsburg after draw|
|Angels star Ohtani to undergo Tommy John surgery|
|Simeone tips Gimenez to be fit for Madrid derby|
|Smith on his NBA Finals miscue: People make mistakes all the time|
|Rams CB Talib to have ankle surgery|
|Cousins ´feeling a lot better´, still unsure when he´ll return|
|I knew we´d be in trouble with Jones on penalties – Mourinho|
|Coyotes forward Galchenyuk expected to miss opener|
|Guardiola won´t compare Foden to Iniesta|
|Lampard shell-shocked as Derby win at Old Trafford|
|Ryder Cup 2018: USA celebrities take the honours|
|Manchester United´s torrid penalty shoot-out run continues against Derby|
|Guardiola: Foden already a great, great player|
|Atletico Madrid 3 Huesca 0: Rojiblancos cruise ahead of Madrid derby|
|EFL Cup: Lampard dumps out Mourinho, Burnley lose at Burton Albion|
|Mourinho denies Pogba row despite stripping midfielder of vice-captaincy|
|Fabinho situation not complicated, insists Klopp|
|Manchester United 2 Derby County 2 (Derby win 8-7 on pens): Lampard heaps pressure on Mourinho|
|Afghanistan snatch tie after Shahzad pummels India|
|Inter 2 Fiorentina 1: D´Ambrosio maintains Nerazzurri revival|
|Oxford United 0 Manchester City 3: Foden stars as EFL Cup holders cruise into round four|
|Cousin takes Gabon post after Aubameyang rejection|
|Bayern Munich 1 Augsburg 1: Neuer error costs champions|
|Paris Saint-Germain must be a Champions League force to help Neymar - Baptista|
|Salgado warns of ´war´ in Spanish football|
|Cech deserves Arsenal place, says Seaman|
|Halep and Garcia among seeds to fall in Wuhan|
|F1 Raceweek: Mercedes taking no comfort in points advantage|
|Benitez charged by FA for referee comment relating to Zaha treatment|
|Cibulkova dumps out hampered Halep in Wuhan|
|Mourinho questions his players amid reports Pogba won´t captain United again|
|European Ryder Cup diary: Fleetwood´s hair delights Poulter|
|USA Ryder Cup diary: Tiger´s roaring reception, McEnroe´s bold prediction|
|Loans to be limited under new FIFA proposal|
|Prolific Nadolo signs new Montpellier contract|
|Modric? For us, Messi is the best – Valverde|
|Murray makes winning start in Shenzhen|
|Mickelson would cherish first victory on European soil|
|Hodge hoping pressure proves too much for South Africa|
|Woodward in show of support for under-fire Mourinho|
|Mickelson jokes he wants ´a shot a side´ from Tiger in Thanksgiving showdown|
|Reed: Captain America is a villain in Europe|
|Duminy to captain Proteas as Elgar replaces injured Amla|
|No Tottenham timeline for Lloris, Vorm returns|
|Woods ready for ´awesome environment´ on Ryder Cup opening hole|
|Tony Bellew determined to prove doubters wrong against Oleksandr Usyk|
|Tuchel explains why he likes Neymar at number 10|
|Manchester United smash revenue record but profits down|
|Furyk downplays Ryder Cup pairings talk, says Tuesday is about individuals|
|Rejuvenated Tiger out to improve poor Ryder Cup record|
|Saunders fined £100,000 for ´sickening´ online video|
|Hazard can reach his full potential with Sarri´s Chelsea - Zola|
|Ryder Cup heading back in Europe´s direction, says Niall Horan|
|Wow! Klopp hails Sarri´s Chelsea transformation|
|Giovinazzi to partner Raikkonen at Sauber in 2019|
|Bjorn backs ´phenomenal´ Rahm to continue trend of Spanish success|
|Durant in no rush to decide Warriors future|
|Rossi to face anti-doping hearing|
|Mignolet to return for Liverpool against Chelsea|
|Premier League ´interesting´ for Germany boss Low|
|Wilder wins Twitter vote to be Joshua´s next opponent|
|BREAKING NEWS: Isco an El Derbi doubt due to appendicitis|
|Juventus won´t rest Ronaldo ahead of Napoli clash|
|Slater cleared to play in NRL Grand Final|
|Top seed Begu sent packing in Tashkent|
|This isn´t my last hurrah in Ryder Cup, insists Poulter|
|Barba back in NRL with North Queensland Cowboys|
|Arsenal wait on Mkhitaryan and Sokratis|
|All Blacks wary of Pumas pack ahead of Buenos Aires Test|
|Ryder Cup has special place in Pep Guardiola´s heart, says Fleetwood|