Real Madrid moved up to third in La Liga after late goals from Casemiro and Luka Modric defeated Sevilla.
The two sides had not played out a draw since 1993 but the game looked to be heading for that outcome as Real spurned several chances to score in a game they dominated.
But, with less than 15 minutes remaining, Casemiro opened the scoring with a stunning long-range effort.
Modric then raced clear in injury time to make sure of the points.
The win sees Real Madrid leapfrog their opponents in the table. They are five points behind city rivals Atletico Madrid, who won 3-0 at SD Huesca.
While the win strengthened Real Madrid’s bid for a Champions League place, a title challenge remains a tough task with leaders Barcelona eight points clear of Los Blancos with a game in hand.
Respite for Real in a season of frustration
This season’s domestic campaign has been a difficult one for Real Madrid fans to muster enthusiasm for.
So used to sparring with Barcelona at the top of the table, six defeats in the league had effectively ended their title challenge by mid-January.
Supporter apathy was evident on Saturday with, not for the first time this season, empty seats visible at the Santiago Bernabeu.
There was for large periods against Sevilla very little for the home fans to cheer, with Real Madrid dominating possession but lacking invention in the final third.
But while they may not possess the quality and guile of past Real Madrid teams they are still capable of the exceptional, as proved when Casemiro delivered an exquisite strike into the far corner from long range.
Consolidating a place in the top four is the most realistic target for Santiago Solari’s side, a target Real Madrid appear to have settled for with reports suggesting there are unlikely to be any major signings or changes at the club until the summer.