Karim Benzema scored twice as Real Madrid overcame the absence of injured Cristiano Ronaldo and suspended Gareth Bale to beat Eibar.
The striker scored from a rebound after Yoel had saved his initial effort and then turned home James Rodriguez's free-kick to double Real's lead.
Benzema set up the third with a cross which Rodriguez slid home over Yoel.
Marco Asensio scored a fourth after Rodriguez's effort hit the post before a late Ruben Pena consolation.
Real are now two points above Barcelona at the top of La Liga, but Barca will go back to the top if they beat Celta Vigo at 19:45 GMT.