Real Madrid climbed to the top of La Liga on Saturday after Karim Benzema's flicked finish helped them claim a thrilling 2-1 victory over Barcelona in a wild Clasico at Valdebebas.
Benzema's superb piece of skill and a deflected Toni Kroos free-kick put Madrid in charge and while Oscar Mingueza pulled one back for Barca, they fell to defeat in what could be Lionel Messi's final appearance in this fixture.
Victory means Real Madrid go level on points with Atletico, with the top three now separated by a single point.
Atletico, without the injured Luis Suarez, face Real Betis on Sunday.
But Real Madrid now own the better head-to-head against both of their rivals while Barcelona and Atletico still have to play each other at Camp Nou in the run-in.
With Atletico stumbling and both Barca and Real Madrid hitting their stride, this game looked set to define, if not the title, then who would become favourites to be crowned champions in May.
The result was a riveting contest at a rain-soaked Alfredo di Stefano stadium - certainly one of the most exciting Clasicos in years - that saw both teams squander numerous chances, several efforts come back off the woodwork and Casemiro sent off in extra time.
With the last play of the game, Barcelona substitute Ilaix Moriba rattled Real Madrid's crossbar.
"We're still in it," said Barca coach Ronald Koeman.
"We've lost a game against a team who is also fighting for the league but we have eight game left and we will fight to the end."
Casemiro's red card had also given Messi a free-kick and the chance for a dramatic equaliser but instead the Argentinian made it seven games now without a goal against Real Madrid, with many wondering if his 45th Clasico will be his last.
Messi might yet turn the tide in the eight games still remaining but there is no doubt Madrid are in the groove after backing up beating Liverpool 3-1 on Tuesday with another crucial victory.
They can finish the job in the Champions League at Anfield next week although Zinedine Zidane admitted afterwards his players are "physically at their limit".
"It was a difficult game, the first half was ours, but we suffered in the second," said Zidane. "We deserved the victory, because we had a lot of chances to score the third."
A breathless first half began with chances for both sides as Marc-Andre ter Stegen's sloppy clearance almost gave Benzema a clear run at goal before Messi slipped in Jordi Alba but the cross was intercepted by Thibaut Courtois.
Real Madrid's opener came after a superb counter-attack from Barcelona, Messi going down too easily on the edge of the area, with Madrid pouring forward on the break.
Fede Valverde powered through midfield and fed wide to Lucas Vazquez, whose cross was expertly flicked inside the near post by Benzema.
The goal shook Barca, who were unable to restrain the speed of Madrid and particularly Vinicius Junior on the break.
Vinicius was brought down by Ronald Araujo on the edge of the area and Kroos' free-kick cannoned off the back off Sergino Dest and in, evading the efforts of Alba to head away on the line.
Valverde and Messi both struck the post before half-time, Valverde after another scintillating Madrid counter-attack and Messi from a corner, with Courtois beaten.
Koeman brought Antoine Griezmann on for Dest but as the rain poured down, Madrid poured forward. Kroos and Benzema both could have scored a third and they were punished for failing to capitalise.
Griezmann jumped over Alba's cross and as the ball skidded through, Mingueza did well to shin it into the net.
Araujo deflected Vinicius' cross onto his own post and Alba was denied by Courtois. Again, Madrid tore away, again they missed the chance, Vinicius running onto Luka Modric's pass but opting not to shoot, allowing Araujo to clear.
With 20 minutes left, Zidane took off Benzema, Vinicius and Kroos.
Referee Gil Manzano had to replace his equipment because of the rain. Messi changed his shirt for a dry one.
Barcelona wantd a late penalty when Ferland Mendy clipped Martin Braithwaite with his arm but the appeal was optimistic.
Casemiro was sent off in the 90th minute for a late challenge on Mingueza, that gave Messi a free-kick on the edge of the area but Courtois saved.
With Ter Stegen up and almost the last kick of the game, Ilaix rattled the crossbar. Madrid survived.