Gareth Bale scored as a much-changed Real Madrid warmed up for Tuesday's Champions League semi-final second leg against Bayern Munich with a 2-1 win over Leganes on Saturday.
Bale bundled Real into an early lead, before Borja Mayoral took advantage of more sloppy defending to make it two before half-time.
Serbian Darko Brasanac gave Leganes hope of a comeback, but Real closed out victory despite struggling in the second half.
Zinedine Zidane's men stay third in the table, one point behind city rivals Atletico who play Alaves on Sunday, when Barcelona can secure the La Liga title if they avoid defeat at Deportivo La Coruna.
Coach Zidane made 10 changes to the starting XI which beat Bayern 2-1 in Wednesday's first leg at the Allianz Arena, with Bale and Karim Benzema returning.
Bale boosted his hopes of a start in the second leg by hooking in a deflected Benzema effort to give Real an eighth-minute lead with his first goal since a double against Las Palmas on March 31.
Leganes had stunned Real with a 2-1 victory at the Santiago Bernabeu in January to reach the Copa del Rey semi-finals, but struggled to make any inroads against their dominant hosts.
Daniel Ceballos fired narrowly over, but the soon-to-be deposed league champions doubled their advantage on the stroke of half-time.
Mayoral tapped in from close range after Leganes goalkeeper Pichu Cuellar totally missed a left-wing cross, with offside appeals waved away as defender Unai Bustinza had got a touch to the ball on its way through.
It was the 21-year-old Mayoral's second La Liga goal, having also netted against Real Sociedad back in September.
Leganes grew into the game after the break as Real's thoughts perhaps turned towards Bayern, and Miguel Guerrero wasted an excellent chance to halve the deficit as he headed wide from a Nabil El Zhar cross.
But the away team did pull one back in the 66th minute, as Nordin Amrabat forced his way to the byline and squared for Brasanac to tap in from close range.
On-loan Watford winger Amrabat was proving dangerous, and the Moroccan saw a low shot saved by stand-in Real goalkeeper Kiko Casilla.
Leganes continued to pile on the pressure, with Casilla making a brilliant stop to deny Bustinza.
Leganes defender Gabriel sent off in injury-time, as Real clung on for the three points after a below-par performance.
- Own-goal double settles Basque derby -
Earlier on Saturday, Athletic Bilbao midfielder Mikel San Jose scored two own goals as his side slipped to a 3-1 defeat at Real Sociedad in Saturday's Basque country derby.
The 28-year-old volleyed a corner emphatically past his own goalkeeper Kepa Arrizabalaga in the 15th minute, before Mikel Oyarzabal doubled the advantage before half-time.
San Jose became only the second player to ever score two own goals in a La Liga match at the Anoeta Stadium, putting through his own net early in the second half before Raul Garcia scored a consolation from the penalty spot.
Elsewhere, Espanyol all but assured safety with a 1-1 draw against already-relegated Las Palmas.
Deportivo La Coruna will join Las Palmas and Malaga in dropping into the second tier if they fail to beat Barcelona on Sunday.
Sevilla sacked coach Vincenzo Montella after just four months in charge after seeing their winless run extended to nine games with a 2-1 loss at lowly Levante on Friday.
It was the second time the Italian had been sacked this season, after being dumped by AC Milan last November.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook atAhramOnlineSports.)