Madrid moved to within three points of leader Atlético Madrid, which faces a tough test at fourth-place Sevilla on Sunday.
Marco Asensio and Karim Benzema scored in a 2-0 win over Eibar as Real Madrid tightened the Spanish league title race before its meeting with Liverpool in the Champions League.
Asensio had already hit the woodwork before he opened the scoring in the 41st minute. Benzema added a second goal with a header in the 73rd.
Madrid moved to within three points of leader Atlético Madrid, which faces a tough test at fourth-place Sevilla on Sunday. Barcelona is four points back before it plays Valladolid on Monday.
Madrid hosts Liverpool on Tuesday in the first leg of the quarterfinals of the Champions League. Four days later it will play Barcelona in a key match in the Spanish league, followed by its second leg at Liverpool on April 14.
“We are facing an important week, and the first important thing was to win today,” said Asensio, after scoring a third goal in as many games.
“Now we have the first leg against Liverpool and then Barcelona. They will be very demanding matches and we have to be up to the challenge.” With Sergio Ramos out with a left-leg injury, Madrid coach Zinedine Zidane rested his other first-choice centerback, Raphael Varane, for the matches ahead.
Backups Nacho Fernández and Éder Militão started in a three-man backline along with Ferland Mendy. Toni Kroos was also rested, giving Isco Alarcón a spot in the starting 11.
Madrid dominated the game throughout. Eibar needed goalkeeper Marko Dmitrovic to save a one-on-one chance for Benzema three minutes into the match after defender Alejandro Pozo made a horrible pass that was poached by the Madrid striker in the box.
Asensio bent a free kick off the crossbar before he took the opener.
Casemiro intercepted a pass and immediately sent the ball forward for Asensio, who used superb control to go past defender Anaitz Arbilla before curling a shot over Dmitrovic.
Eibar had been limited to two long-range efforts from midfielder Pape Diop in the first half.
Its attack was further diminished when forward Bryan Gil, who debuted for Spain last week, had to be substituted at halftime for an apparent leg injury.
But the visitors were almost gifted an equalizer with half an hour to play after heavy rain and strong winds. A tame-looking pass from Lucas Vázquez back to Thibaut Courtois slipped past him and the Madrid goalkeeper had to slide to kick the ball clear before it crossed his goal-line.
After that scare, Benzema put the result beyond doubt when substitute Vinícius Júnior crossed for him to score his 18th league goal of the season.
Eibar remained in the relegation zone after 12 rounds without a win.
“We barely bothered them in the first half,” Eibar striker Kike García said. “We knew this would be a hard game.”