Cristiano Ronaldo scored a hat-trick as Real Madrid ended Sevilla's remarkable unbeaten home run with a 3-2 win at the Ramon Sanchez Pizjuan on Saturday evening.
The Portugal forward netted twice within a minute late in the first half to put Los Blancos in command, but their advantage was reduced to a single goal before the break when Carlos Bacca scored from the penalty spot after an ill-advised challenge by Sergio Ramos.
Ronaldo headed in a fine Gareth Bale cross from a tight angle to calm the visitors' nerves midway through the second period, only for Vicente Iborra to set up a tense finale. But Madrid held on to become the first side to beat Unai Emery's side on their own turf since February 2014.
The result kept Carlo Ancelotti's side two points behind Primera Division leaders Barcelona, who triumphed 8-0 at Cordoba earlier on Saturday, with just three games of the season remaining. Sevilla stayed fifth.
Ancelotti put out an almost identical side to the one that overcame Atletico Madrid last month at the Bernabeu, deploying Ramos in defensive midfield and keeping faith with Javier Hernandez, with Bale starting on the bench despite recovering from a calf injury.
Madrid were on top in the first half and could have taken the lead as early as the 10th minute, but Ronaldo was denied at point-blank range by Sevilla goalkeeper Sergio Rico.
Sevilla's first opportunity came a few minutes later when Aleix Vidal was played onside by Marcelo, but Raphael Varane nipped the midfielder's shot away.
Midway through the first half Emery's side moved forward again. Vidal played in Bacca down the right and the Colombian's powerful cross flew just beyond the outstretched leg of Jose Reyes.
The key moment in the first half arrived when Ramos and Grzegorz Krychowiak clashed while contesting a high ball, and the Sevilla man was forced off the pitch to treat a bloodied nose. Madrid began to control the midfield in the powerful Pole's absence and it was from the middle of the park that both their goals stemmed.
Ramos was afforded a lot of space in midfield, allowing him to pass to Marcelo, who in turn realised Isco down the left, and the former Malaga man pinged a cross back into the box from the byline which Ronaldo sent crashing into the net.
Sevilla desperately tried to get Krychowiak back onto the pitch after the goal but, before they could do so, Ronaldo struck again. This time James Rodriguez chipped the ball into the box from the right and Hernandez flicked it towards the back post for the former Manchester United player to stab home.
Madrid were cruising against the team with the best home form in La Liga, but the hosts were allowed a way back into the match thanks to a moment of madness from Ramos -- a product of their youth academy.
Ramos dived in with both feet towards Vidal near the byline and sent the midfielder flying, conceding a penalty and collecting a yellow card. Bacca slammed the spot-kick into the bottom corner, with Iker Casillas diving the wrong way.
Sevilla began the second period with intent but struggled to create any clear chances, and the deficit was restored to two goals midway through the half.
Ancelotti brought on Bale for Hernandez and the Welshman made a dramatic return to action after 14 days out, wriggling free of his marker on the right to swing a cross in towards Ronaldo at the back post, and the Portuguese stuck his neck out to direct the ball past Rico. It was his 42nd league goal of the season and his 25th Primera Division hat-trick, overtaking Lionel Messi in both facets.
But the contest was not over yet. Kevin Gameiro linked up with Vidal on the right, allowing the midfielder to cut the ball back for Iborra to lash past Casillas.
Eleven minutes remained -- enough time for Toni Kroos to test Rico, but it was Casillas who was the busier keeper in the closing stages. The Madrid man made two vital saves from Gameiro and Iborra to preserve the visitors' lead and keep the title race alive.