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).
|Umar Akmal faces anti-corruption unit after making spot-fixing claims|
|This will not be Pogba´s last World Cup - Deschamps|
|South Korea v Germany: Reus and Werner wary of pace and Son|
|Alderweireld aims to earn his Spurs against in-form Kane|
|Serbia v Brazil: Mitrovic ready to inflict World Cup agony on Brazil|
|Debuchy signs three-year Saint-Etienne deal|
|France won´t be extra motivated by Hareide barbs - Deschamps|
|Ryans descend on Russia - Socceroos keeper reveals 27 family members at World Cup|
|Alonso hopes French GP result was a one-off for McLaren|
|Messi ´not guilty of anything´, insists Maradona|
|Egypt keeper El Hadary makes history as World Cup´s oldest player|
|Guerrero to give Jedinak ´big hug´ for help battling ban|
|Eurovision and World Cup glory in the sights of eternal optimists Iceland|
|As long as we win, I don´t care who scores - Werner relishing World Cup experience|
|Wigan head coach to switch codes after being handed Scottish Rugby role|
|Switzerland v Costa Rica: Lang shrugs off Shaqiri controversy|
|Runners and Ryders: Watson jumps two places, Casey into automatic spot|
|Fekir offered contract extension, reveals Lyon president|
|Which F1 races has Lewis Hamilton not won?|
|Return to Sevilla would be a dream, says Layun|
|Paine: Don´t write off Australia´s World Cup defence|
|Gareca: My Peru future? I´ll give an answer soon|
|Bayern Munich´s Friedl to see out loan deal at Werder Bremen|
|Hooper out for at least a month, Folau set for hearing|
|Skoko backs former team-mate Dalic to take Croatia ´quite a way´ at World Cup|
|If Iceland go forward, we will go forward - Lada replaces longboat in Norse odyssey|
|Morata ´too expensive´ for Dortmund - Zorc|
|Hearn questions ´deluded´ Wilder´s desire for Joshua fight|
|Belgium game a ´perfect dress rehearsal´ for England, insists Carragher|
|World Cup permutations: How can Argentina qualify for last 16?|
|Bulldogs playmaker Foran out for season|
|RFU chairman offering no guarantees over Jones future|
|Algeria looking for new coach after parting ways with Madjer|
|Cahill still has something to offer Australia - Bosnich|
|Fear has discouraged Danes from travelling to Russia, says Sorensen|
|Reds rally to complete four-game sweep of Cubs|
|Arzani ready for Socceroos start against Peru – Skoko|
|Braves place closer Vizcaino on DL with right shoulder inflammation|
|West Indies hold slight edge against Sri Lanka|
|Don´t touch my Grizou – Pogba defends France team-mate|
|Yankees catcher Sanchez likely heading to DL|
|Messi is frustrated and hungry – Mascherano|
|Nainggolan the ´ninja´ Inter were missing, says Spalletti|
|Anthony fires back at Thunder fans unhappy he´s staying|
|MLS Review: New York City edge Toronto in Torrent´s first game|
|Watson shoots 63 to win Travelers for third victory of season|
|Iran contest not all about Ronaldo, insists Santos|
|Truex´s team use tricky strategy to win at Sonoma|
|World Cup 2018: England at home, Brazil´s party and exploding White Nights in St Petersburg|
|Pogba reveals ´issues´ with Mourinho|
|Mascherano plays down rumours of Sampaoli bust-up|
|Sweden winger Durmaz says racist abuse ´passed limit´|
|Morgan hails ´outstanding´ Buttler century|
|Paine to discuss ODI future after England whitewash|
|Cuper unsure of Egypt future as El Hadary nears milestone|
|Koepka ´shutting down´ until Carnoustie|
|Quintero and James plot Colombia´s way through uncharted territory|
|Federer upbeat despite shock Halle defeat|
|Journalists should round on Vettel - Verrstappen|
|Poland 0 Colombia 3: Falcao´s maiden World Cup goal revitalises Pekerman´s side|
|World Cup 2018: Cossack kids, Swan Lake and the Selecao in Rostov-on-Don|
|Maria takes maiden title in Mallorca|
|Hierro: I am 100 per cent the coach of Spain|
|Busquets recognises Iniesta´s burning ambition|
|Denmark v France: Tolisso hoping for second chance|
|Eight-try Wakefield hammer sorry Widnes|
|World Cup 2018: A panda, a tapir and a nightmare for Willy in Nizhny|
|Senegal´s Wague makes African history in World Cup|
|Cilic fights back to beat Djokovic in enthralling Queen´s final|
|Neymar and Suarez among players to send Messi birthday wishes|