Valencia came from behind to snap Real Madrid's winning streak at 22 games and blow the La Liga title race wide open with a 2-1 win at Mestalla on Sunday.
Cristiano Ronaldo's first-half penalty had the visitors on course for a four-point lead at the top, but Valencia roared back after the break with goals from Antonio Barragan and Nicolas Otamendi to move back above Sevilla into fourth.
Madrid now lead Barcelona by just a point with both sides having played 16 games, but the Catalans can move to the top with victory away to Real Sociedad later on Sunday.
Roared on by a vociferous home support, Valencia started with the same intensity that had rocked Atletico Madrid and Barcelona on their visits to Mestalla previously this season.
However, they couldn't convert that enthusiasm into chances and instead went behind on 19 minutes when Alvaro Negredo handled Gareth Bale's flick on from Toni Kroos's free-kick and Ronaldo duly stepped up to fire home his 33rd goal of the season from the penalty spot.
The World Player of the Year should have doubled his tally and his side's lead 12 minutes later when Bale's deflected cross fell perfectly into his path, but after rounding Diego Alves, Ronaldo could only turn the ball into the side-netting with the goal gaping.
A slew of yellow cards then followed as referee Jesus Gil Manzano dished out seven bookings inside the opening 45 minutes, but the lack of flow seemed to benefit Valencia as they ended the half the stronger.
Barragan should have done better when he fired straight at Pepe when well-placed inside the area and the visitors were fortunate to see Andre Gomes's deflected shot come back off the post in the last action of the opening period.
Valencia also started the second-half in the ascendency as Gomes sent another shot flying inches wide, but they were finally rewarded when Pepe this time turned a low drive from Barragan past the helpless Iker Casillas.
Bale had a great chance to restore Madrid's lead when he galloped in behind the Valencia defence seven minutes later, however the Welshman was denied by a fine saving challenge from Otamendi.
And just moments later, the Argentine centre-back was the star at the other end of the pitch as he towered above Ramos to power a header high past Casillas.
Barragan should have given the hosts a two-goal cushion when he shot wide with just Casillas to beat at the end of a lovely move.
Madrid boss Carlo Ancelotti reacted by withdrawing Bale and the ineffective James Rodriguez for Sami Khedira and Jese Rodriguez, while Javier Hernandez replaced Karim Benzema shortly afterwards.
The European champions rallied in the final 15 minutes, but couldn't find an equaliser as Ramos sent a header inches wide before Alves denied Isco with a brilliant save from point-blank range and Otamendi cleared the danger before a Madrid player could pounce on the rebound.