Karim Benzema struck twice as Real Madrid held on for their first home win of the season by beating Levante 3-2.
France international Benzema scored his third and fourth goals of the campaign before Casemiro put Real 3-0 up before half-time.
Levante hit back in the second period with goals from Borja Mayoral and Gonzalo Melero to give Zinedine Zidane’s side a real scare.
Real, for whom fit-again Eden Hazard made his long-awaited debut off the bench in the 60th minute, weathered an early flurry from Levante before taking full command midway through the first half.
After Benzema had forced Levante goalkeeper Aitor Fernandez into a brilliant save and Lucas Vazquez’s deflected effort had hit the outside of a post, it was a matter of time before Zidane’s side opened the scoring.
Real right-back Dani Carvajal got on the end of a flowing move in the 25th minute and his excellent cross was expertly headed home by Benzema.
Benzema slotted home his second goal six minutes later after being set free by James Rodriguez. It was the France international’s third goal in four LaLiga games this season.
Real appeared to have put the game beyond Levante five minutes before half-time.
Vazquez sent Vinicius Junior clear down the right and his cross was steered home by fellow Brazilian Casemiro, who had charged into the box.
The restart was delayed while the video assistant referee checked whether Benzema had been fractionally offside, but the goal stood.
Levante silenced the Bernabeu four minutes after the restart when Mayoral fired home from 10 yards against his former club.
Benzema went close to his hat-trick when his curling effort rebounded off the inside of a post before Hazard stepped off the bench to make his first appearance since his summer switch from Chelsea as a replacement for Casemiro.
Hazard almost set up a goal for Vinicius Junior with his first touch, but the Brazilian’s shot from the Belgian’s cross was blocked.
Vinicius Junior thought he had scored Real’s fourth in the 62nd minute, but his effort was ruled out after another lengthy VAR referral after Rodriguez had strayed offside.
Levante struck their second goal with 15 minutes remaining. Jose Campana’s cross from the left was headed home at the far post by Melero and all of a sudden Real were hanging on.
Enis Bardhi fired narrowly off target and, although Rodriguez fired inches wide for the home side with a low shot, Levante defender Ruben Vezo’s header forced Thibaut Courtois into an instinctive save in time added on.
The visitors went close again in the closing moments when Jose Luis Morales fired into the side-netting and Real breathed a sigh of relief at the final whistle.