An outstanding performance by the goalkeeper Real Madrid coach Zinedine Zidane passed on during the January transfer window left the multiple European champions needing some Cristiano Ronaldo magic in the final minutes to avoid a loss to Athletic Club Bilbao.
With the domestic title out of reach, La Liga has become almost a distraction for Real Madrid as they pursue their third consecutive Champions League crown, reports EFE news agency.
But the man guarding the Athletic goal here on Wednesday, Kepa Arrizabalaga, focused exclusively on the task at hand and the display he put on at the Bernabeu is likely to give Zidane second thoughts about his decision against signing the visiting goalkeeper when he had the opportunity.
The hosts got chances early.
The cross-bar repelled a thunderous header by Ronaldo, while Kepa made an initial stop against Marco Asensio before denying Cristiano's rebound try.
In the 14th minute, Athletic's Iñigo Cordoba spotted a gap in the Blancos defense and got the ball deep to Iñaki Williams, who beat keeper Keylor Navas to put the visitors up 1-0.
Real Madrid responded and Kepa continued to meet the challenge, stopping Cristiano from close range and Marcelo's effort from distance.
Asensio was the protagonist of the final play of the first half, racing down the field to catch up with a deep ball to the corner flag and beating the last defender to deliver the shot, only to see Kepa make the save.
Athletic had more of the ball after the break and it took a diving lunge by Navas to prevent Williams from getting a second goal.
The home keeper then got help from Marcelo, who stood on the goal line to block Cordoba's effort, before Raul Garcia hit the cross-bar.
Kepa appeared to have sealed the victory for Athletic when he made a great save against Lucas Vazquez, but Luka Modric sent a ball into the crush in front of the visiting goal and Ronaldo managed to divert it into the net to save Real Madrid from an embarrassing home defeat.
The outcome leaves Real Madrid in third place, three behind cross-town rivals Atletico, who have a game in hand.
Atletico, coming away from a match at the Bernabeu with a point for the first time in 13 years, sit 12th in La Liga.