BARCELONA, Spain -- Atletico Madrid and Real Madrid both slipped up in the Spanish league on Sunday to tighten a compelling title race even further.
Atletico's march toward its first title since 1996 hit a bump when it lost 2-0 at Levante, although its city rival failed to make up much ground as Madrid needed a spectacular injury-time equalizer from Cristiano Ronaldo to salvage a 2-2 draw at home against Valencia.
Barcelona had written off its title defence after drawing 2-2 with Getafe on Saturday, but its rivals' stumbles have put it right back in the hunt.
Barcelona trails Atletico by three points, while Madrid was left five points behind with an extra game to play after Ronaldo deftly used the sole of his right boot to turn in a cross in the 92nd minute.
"It was a tough round for all three at the top and the league is more wide open than ever," said Madrid coach Carlo Ancelotti. "I always said it would come down to the last game."
Madrid's draw meant that Atletico can clinch the title if it takes four points from its last two games because it holds the head-to-head tiebreaker over Madrid if they end up level on points. Atletico hosts Malaga next weekend before finishing the season at Barcelona's Camp Nou.
"Now the league is that much more interesting," Atletico coach Diego Simeone said after his team's nine-round winning run came to a halt at Ciutat de Valencia stadium.
Levante pressed Atletico early and was rewarded when Papakouly Diop's corner kick hit Atletico left back Filipe Luis in the chest. The ball bounced out of reach of scrambling goalkeeper Thibaut Courtois before settling into the net in the seventh.
Atletico improved after bringing on substitutes Arda Turan and Adrian Lopez after halftime but conceded again when striker David Barral beat Courtois in the 69th.
Far from bemoaning the setback, Simeone said that defeat was "the best thing that could happen" to his team to keep it focused on the run-in not only to the league title but also to the Champions League final with Madrid on May 24, a week after the league concludes.
"Three weeks of high intensity and emotion await us," Simeone said. "This is the ideal moment for my men, for my players. We have three finals ahead of us and we have to concentrate on the first of those against Malaga next Sunday."
Four days after its commanding 3-1 victory at Chelsea to reach the final of the Champions League, Atletico was brought down by the modest Levante side that has outperformed expectations thanks to coach Joaquin Caparros' defensive focus and Keylor Navas's goalkeeping.
"We didn't want to mess up a title for anyone, I hope they (Atletico) win it," Barral said. "We want to finish the league in the best fashion we can."
The match was marred at the finish by a group of Atletico fans who directed racist jeers at Diop. The player from Senegal responded by doing a dance. He later called for an end to such racist displays.
Valencia arrived to the Bernabeu after its demoralizing exit from the Europa League semifinals when it conceded an injury-time goal to Sevilla on Thursday, while Madrid was flying high from its rout of Bayern Munich in the Champions League.
Valencia turned to a set piece to grab the lead in the 44th when defender Jeremy Mathieu got in front of Raphael Varane inside the six-yard box to head in a corner kick.
Ancelotti sent on Angel Di Maria at halftime to spark Madrid's attack, and the forward lobbed a ball for Ronaldo to flick on for Sergio Ramos to nod home in the 59th and add to his two goals against Bayern.
Valencia wasn't done, however, and Dani Parejo drove in a squared pass from Feghouli in the 65th after Seydou Keita had won the ball in midfield to start the move.
Ronaldo then appeared to save Madrid from a costly defeat by flicking in Di Maria's cross to take his league-leading tally to 31 goals this season. He reached 50 goals in all competitions for the fourth straight season.
Elsewhere, Ramon Azeez's last-gasp goal gave 10-man Almeria a 3-2 win at home over relegated Real Betis to help pull his team out of the drop zone, while Sevilla drew 0-0 at home with Villarreal.