Real Madrid needed another late winner to edge closer to the La Liga title as Marcelo was the hero in a 2-1 home victory over Valencia on Saturday.
Cristiano Ronaldo opened the scoring midway through the first half but also saw a penalty saved by spot-kick specialist Diego Alves early in the second period.
Former Madrid man Dani Parejo looked to have handed Valencia an unlikely point with a stunning free-kick eight minutes from time.
Real stormed forward and needed just four minutes to find the winner when Marcelo cut inside and fired into the far corner.
Real now lead Barcelona by three points at the top of the table with four games to go for both sides.
Barca, though, can move back to the summit of La Liga with victory in the Catalan derby later at Espanyol.
Madrid boss Zinedine Zidane accepted his side nearly paid the price for taking their foot off the gas at 1-0.
"It is true that we were in a comfort zone for 30 minutes, the fans were the same," said the Frenchman.
"After Valencia scored they started to push the players on once more and it was a completely different match."
The Brazilian Marcelo added: "We put our heart and soul into it and showed who we are
"With the fans behind us we are hard to beat here."
Zidane recalled eight of the side that started last weekend's 3-2 El Clasico defeat to Barcelona and had been rested for a 6-2 thrashing of Deportivo la Coruna in midweek.
However, the habitual first team nearly got off to the worst possible start.
Captain Sergio Ramos was returning from suspension after his 22nd career red card in the Clasico and his weak header allowed Santi Mina through on goal inside the first minute.
Keylor Navas came out to block the Valencia striker's first effort before his follow-up hit the outside of the post.
Fabian Orellana also screwed a great chance wide as Valencia enjoyed the better of the early stages.
However, Ronaldo punished their profligacy in characteristic fashion as he bulleted Dani Carvajal's cross into the far corner on 27 minutes.
That goal took Ronaldo's tally in league football to 367 goals to surpass legendary English striker Jimmy Greaves in Europe's top leagues.
However, even the four-time World Player of the Year struggles to beat Alves from the spot.
Madrid were awarded a penalty when Luka Modric went down under slight contact from Parejo 11 minutes into the second half.
And for the third time in four penalties against Alves, Ronaldo was denied by the Brazilian.
Ronaldo then missed an even easier chance as he bundled over and then crashed into the goalpost from Marco Asensio's enticing cross.
At the other end Navas's search for a clean sheet continues as for the 15th straight game the Costa Rica international was beaten, this time by Parejo's dipping free-kick to set up a grandstand finish.
Yet, for the seventh time in La Liga this season, Madrid struck late to maintain the upper hand in the title race as Marcelo used his weaker right foot to fire across and past the helpless Alves to joyous scenes of relief at the Bernabeu.
Earlier, Adrian Ramos scored Granada's first goal under interim boss Tony Adams but a 2-1 defeat at Real Sociedad relegated them after a six-year stay in the top flight.
Granada have now lost all four games since Adams replaced the sacked Lucas Alvarez and face Real Madrid next weekend.