Karim Benzema rescued Real Madrid at the death with a stoppage-time equaliser that salvaged a 1-1 draw away to Valencia, but they missed the chance to go into El Clasico top of the table.
Madrid looked to be heading for a deserved defeat when Carlos Soler netted with 12 minutes to go, but Benzema smashed in from close range right at the end, meaning Los Blancos head into Wednesday's clash with bitter rivals Barcelona level on 35 points with them.
Madrid started with the greater purpose but failed to make the most of their opportunities, offering encouragement to Valencia, who threatened several times through Ferran Torres.
Much of the second half was cagier, with clear-cut chances less frequent, but Soler finished off a swift move to finally open the scoring, before Madrid avoided defeat with one of the last kicks of the game – Benzema saving Zinedine Zidane's men.
An entertaining opening saw Madrid quickly establish control and the chances flowed, but Valencia managed to cling on – Federico Valverde and Toni Kroos testing Jaume Domenech from distance, before Benzema headed just off target.
But Torres caused panic at the other end in the 18th minute, turning Raphael Varane in the box after being released by a throughball, only for his eventual effort to be hit straight at Thibaut Courtois.
The 19-year-old spurned an even better opportunity just past the half-hour mark, beating Courtois to Jose Gaya's cross but heading over the empty net.
Valencia began the second half on top and Torres went close again early on, Courtois making a vital block after the attacker had played a one-two with Rodrigo Moreno.
The breakthrough finally arrived in the 78th minute, with Soler emphatically finding the roof of the net from a Daniel Wass cut-back.
Valencia looked to have done enough when Luka Jovic had a goal disallowed for offside, but Madrid's resilience saw them clinch a point – Benzema blasting in after Courtois, up for a corner, had a header saved by Domenech in a dramatic finale.
What does it mean? Madrid miss an opportunity but avoid injuries
With the Clasico on the horizon, Madrid coach Zidane probably just wanted to get through this match injury and suspension-free, and without losing.
He can tick each box in that regard, while the character they showed to rescue a result right at the end will surely give them a morale boost heading into Wednesday's massive showdown, even if the performance was nothing to get excited about.
Benzema a worthy hero
If anyone in a Madrid shirt deserved to find the net, it was Benzema. The Frenchman had been at the centre of almost everything from an attacking sense, getting six shots away and creating another six opportunities – four more than anyone else on the pitch.
Isco fades into the background on Mestalla return
Perhaps affected by the frosty reception he is often afforded when he returns to his former club, Isco was bitterly disappointing. The playmaker failed to create a single opportunity before he was withdrawn and replaced by Gareth Bale with 21 minutes to go.
In their final match of 2019, Valencia go to Real Valladolid on Saturday. Madrid close out the year the following day at home to Athletic Bilbao, but before that they have the rearranged Clasico against Barca at Camp Nou to prepare for on Wednesday.