Karim Benzema scored with the final kick of the game to give Real Madrid a 3-3 draw at Sevilla in the Copa del Rey and extend their unbeaten run to 40 games, breaking Barcelona's record for Spanish clubs.
Zinedine Zidane's men have not lost since a 2-0 defeat at Wolfsburg in the Champions League last season, going on to record 30 wins and 10 draws.
Madrid broke the previous record for a Spanish club of 39 unbeaten games in all competitions, set last season by archrivals Barcelona.
With Real enjoying a 3-0 advantage from the first leg, Zidane chose to rest star players Cristiano Ronaldo and Luka Modric, taking a safer long-term view rather than prioritising the streak.
And the run appeared to be in major jeopardy with Sevilla leading by two goals in the second half, but Sergio Ramos got a goal back with an 83rd-minute penalty before Benzema ran past multiple defenders and put a deflected shot into the net to keep Real Madrid unbeaten.
It was only the second time during the unbeaten run that Real Madrid have trailed by two or more goals, with the last coming against Rayo Vallecano last April when they allowed two goals in the first 15 minutes but rallied to win 3-2. Ramos has scored four of the 14 goals Madrid have found when they have been trailing.
The result also means that Zidane has still won more trophies — the 2015-16 Champions League, 2016 UEFA Super Cup and 2016 Club World Cup — than he has lost games, having seen defeat just twice since taking over a year ago.
Juventus hold the all-time record among clubs in the top five European leagues for their unbeaten run of 43 matches in all competitions, set when current Chelsea manager Antonio Conte was in charge in 2011-12.
Madrid's previous longest unbeaten run was 34 games, set during the 1988-89 campaign when they won the Primera Division title, only losing once in 38 games.
Thursday's draw capped a 6-3 aggregate triumph over Sevilla as Zidane's men advanced to the quarterfinals.
If they continue to avoid defeat, Madrid could equal Juventus' European record at home in La Liga against Malaga on Jan. 21 and break it in the second leg of their Copa quarterfinal the following week.