Gareth Bale's header and Cristiano Ronaldo's penalty eased the pressure on manager Rafael Benitez as Real Madrid earned an unspectacular win at Eibar.
Bale glanced in a Luca Modric cross just before half-time to claim his third goal of the season.
Ronaldo then scored his 16th after Lucas Vazquez was tripped late on.
Real avoided a third successive league defeat for the first time since the end of the 2008-09 season to move six points behind leaders Barcelona.
Benitez had received the backing of Real Madrid president Florentino Perez following his side's 4-0 defeat by Barcelona in last weekend's Clasico.
But the position of the former Liverpool manager would have been placed under further scrutiny had Real failed to beat the smallest club in La Liga and lost more ground in the title race.
Seventh-placed Eibar had lost only twice in the league this season and held their own for long periods.
But despite fielding a makeshift defence missing the injured Sergio Ramos, Raphael Varane and Marcelo, Real's lead was rarely threatened once Bale broke the deadlock before the interval.
Ronaldo missed good chances either side of the break when he had just goalkeeper Asier Riesgo to beat.
But he ended his frustration from the spot eight minutes from time after Dani Garcia brought down substitute Vazquez, as Real secured the result Benitez badly needed.