Kylian Mbappe struck for the fourth consecutive game as Real Madrid survived a late scare to beat Alaves 3-2 in LaLiga Tuesday.
Real, second, cut the gap on Barcelona to one point before the leaders host Getafe Wednesday.
Real dismantled Alaves with goals from Lucas Vazquez, Mbappe and Rodrygo Goes before a late salvo from the visitors rocked Carlo Ancelotti's side.
Carlos Protesoni and Kike Garcia scored two goals in two minutes in the final stages but Real held on.
"This is football, you can think the game has finished, (then there's) a small slip and they score the first, they get confidence and you lose it, this is what happens," Ancelotti told reporters.
"Obviously we don't want this to happen, but it can.
"We have to highlight that for an hour the team played well and that gives us confidence."
Los Blancos overpowered Alaves from the start in what was a hugely uneven contest for most of the game, despite the Basque side's solid start to the season.
Ancelotti brought Vinicius Junior back into the starting line-up and gave Vazquez a rare start and the pair combined inside the first minute.
The Brazilian winger surged in from the left flank and cut the ball back for a simple finish from Vazquez.
Ancelotti said Monday he wanted more intensity at the outset of matches after Real had scored just one first half goal this season in LaLiga or the Champions League, and his demand was swiftly met.
Los Blancos dominated with Alaves barely reaching Thibaut Courtois' penalty box.
Despite that Real’s second goal only came five minutes before the interval, when Mbappe and Jude Bellingham combined beautifully.
France captain Mbappe conjured a clever flicked pass to the England international, who completed a one-two by sending his team-mate through on goal.
Mbappe took two deft touches to shake his marker and get a sight of goal, before stroking home clinically for his fifth league goal.
Rodrygo expanded Real’s lead soon after the interval, roaming in with freedom from the right and firing through Alaves goalkeeper Antonio Sivera's legs.
Teenage Brazilian striker Endrick hit the post with a deflected effort and Abde Rebbach also struck the woodwork as Alaves made a rare foray forward.
Real substitute Endrick, 18, was fortunate not to be dismissed when he kicked out at Alaves defender Santiago Mourino.
Mbappe was taken off after 80 minutes and appeared to be suffering some discomfort, holding the back of his thigh.
"He's fine, he's fine, a little overloaded, he asked me for the change to avoid problems," explained Ancelotti.
The visitors pulled one back after 85 minutes when Protesoni curled home a sweet strike from the edge of the box.
Protesoni then turned provider with a fine ball over the top which Kike fired home well.
Real hung on for the victory, their 39th consecutive league game unbeaten in Ancelotti's 300th game at the helm across two spells at the club, ahead of Sunday's derby clash with Atletico Madrid at Metropolitano.
The Rojiblancos' stadium was where they last tasted defeat in the top flight, exactly a year ago.
"I'm happy for the win," Vazquez told Real Madrid TV.
"I think we had a great game until the 80th minute, when two mistakes cost us two goals against us, and we had to suffer more than we should have.
"With the game that we played, we didn't deserve that ending."
Tempers frayed at full time when Ancelotti confronted the referee, seemingly unhappy with a few of his players being booked while some of Alaves' tough tackling went unpunished.
"Fair or unfair, we have to adapt to the new rules," a calmer Ancelotti said later, as several of his players were carded for protesting decisions.
Alaves coach Luis Garcia Plaza was also angry at full-time after Endrick got away with lashing out.
"The Endrick incident should have been a red card, we should have played the last 10 minutes with an extra player," said the coach.
"It's red, there's nothing more to it, I won't speak more about this topic."
Diego Simeone's Atletico visit Celta Vigo Thursday among other fixtures.
RESULTS
Sevilla 2 (Torres 45-og, Ejuke 85) Valladolid 1 (Perez 56)
Valencia 0 Osasuna 0
Real Madrid 3 (Vazquez 1, Mbappe 40, Rodrygo 48) Alaves 2 (Protesoni 85, Garcia 86)



