Real Madrid beat Leganes 2-1 in La Liga on Saturday after coach Zinedine Zidane heavily rotated his side in preparation for Tuesday's Champions League semi-final second leg against Bayern Munich, including leaving out top-scorer Cristiano Ronaldo.
Wales forward Gareth Bale produced an acrobatic finish from close range on the volley to put Madrid ahead against their neighbours in the eighth minute of the game, narrowly beating the offside trap despite protests from the visiting players.
Borja Mayoral doubled their lead right at the end of the first half by stabbing in from a metre out. Again Leganes appealed for offside but the goal was eventually allowed to stand after the referee consulted with his assistant.
Leganes were unfortunate to go two goals down at the interval after coming to close to scoring on three occasions, including Watford loanee Nordin Amrabat striking the crossbar.
They eventually pulled a goal back in the 66th minute when Darko Brasanac knocked a cutback from Amrabat into an empty net.
Leganes forward Gabriel was sent off after the final whistle for reacting furiously to the referee for ending the game just as he was shaping to shoot at goal from outside the area.
"We dropped in intensity towards the end of the game and that made them stronger. When we drop our intensity, we always suffer, but the important thing is we got the three points," Real midfielder Casemiro told reporters.
"Tuesday (against Bayern) will be a very different game and we'll have to be concentrated the whole time."
Real are third in the league on 71 points, 12 behind runaway leaders Barcelona and one behind second-placed Atletico Madrid.
Atletico visit Alaves on Sunday while Barca play at Deportivo La Coruna, where a point will see the Catalans become Liga champions for a 25th time.
Zidane excluded Ronaldo, captain Sergio Ramos and Raphael Varane from the squad and left Luka Modric, goalkeeper Keylor Navas and influential left back Marcelo on the bench.
He later brought on midfielder Toni Kroos and winger Marco Asensio, who scored the winning goal in the 2-1 victory at Bayern in Wednesday's first leg.
Also on Saturday Colombian striker Carlos Bacca scored a first-half hat-trick as Villarreal thrashed Celta Vigo 4-1 at home and moved closer to qualifying for European football again.
The win tightened Villarreal's grip on sixth place and took them six points above seventh-placed Sevilla who were beaten 2-1 at Levante on Friday, leading the club to sack coach Vincenzo Montella the next day.
Real Sociedad won a Basque derby against Athletic Bilbao 3-1 in defender Inigo Martinez's first game back against his old side since his controversial, 32-million-euro move to fierce rivals Bilbao in January.
Martinez was subjected to constant booing from the home fans, who also waved fake money at him from the stands.
Athletic midfielder Mikel San Jose scored two own goals either side of a strike from Spain Mikel Oyarzabal to put Real Sociedad 3-0 up before Raul Garcia responded for Athletic, who have had a miserable campaign under coach Jose Angel Ziganda and are 14th in the standings.
Real Sociedad climbed up to 10th on 46 points and are two points behind Sevilla, who occupy the final European place.