With Barcelona's faint Spanish league title hopes fading, Lionel Messi scored from a crafty free kick late on to give Barcelona a 2-1 win at Atletico Madrid on Sunday to keep his team in the chase.
Despite their first away victory in three games, Barcelona are still 10 points adrift of leader Real Madrid thanks to Cristiano Ronaldo's superb back-heeled goal in his team's hard-fought 1-0 win at Rayo Vallecano earlier.
After Radamel Falcao had canceled out Dani Alves' opener for Barcelona, Messi caught Atletico's players unawares while they were trying to form a defensive wall by looping a perfectly placed shot into the far side of the net in the 81st minute.
Messi's own bit of brilliance took his league tally to 28 goals - one behind Ronaldo's 29.
"A leader is someone who steps up when the team needs him and Leo has been doing that for the past four years," said Barcelona coach Pep Guardiola, who also acknowledged that his team's shot at winning a fourth straight league title since he took charge is slim.
"I don't believe we will win the league. But I hope we will compete like we did today and that we will compete in the Champions League and Copa del Rey final."
Barcelona dominated possession from the start at Vicente Calderon stadium, patiently probing for a way through an Atletico team on a nine-game unbeaten streak since the arrival of coach Diego Simeone.
Xavi Hernandez, on his return to Barcelona's starting 11, came close in the second minute while Messi had a goal disallowed shortly after for using his hand to control the ball. It was the Argentina forward's fifth yellow card, meaning he will miss next week's match against Sporting Gijon.
Barcelona finally broke through with Dani Alves' goal in the 36th minute. Messi set up the goal by drawing in a swarm of defenders at the top of the box before laying the ball off, allowing Cesc Fabregas to cross to the far post for the Brazil right back to fire home.
"I saw the space open up after my teammates' fantastic combination and I scored off a great set-up by Cesc," Dani Alves said. "Winning in stadiums like this one strengthens you moving forward."
Atletico pressed for an equaliser after halftime. That came four minutes later when striker Falcao knocked in a poor clearance by Sergio Busquets for his 15th goal of the league campaign.
With the score level, the game turned into an up-and-down contest marred by fouls that favored Atletico's more aggressive style.
The hosts looked set to keep Barcelona winless in three straight away games until Messi saw the chance for his 43rd goal of the season in all competitions. The three-time Ballon D'Or winner executed the long-range strike from the left to perfection, his shot leaving goalkeeper Thibaut Courtois to look on helplessly.
After Rayo had outplayed their crosstown rivals in the first half, Ronaldo pounced on a loose ball in the area and flicked it through a pack of defenders with his back to the net in the 54th minute to give Madrid its ninth straight away victory.
"It was a great goal," Madrid goalkeeper Iker Casillas said. "I saw the back-heeled shot and I didn't think it was going in, but it was a great touch of class that he pulled out of nowhere."
Rayo, which entered the game on a three-game winning run, almost went in front before halftime when Francisco "Piti" Medina latched onto a pass, cut back and sent a rising shot off the post.
After the break, Madrid gained control and soon went ahead when Ronaldo scored his 37th goal in all competitions this season.
The game, however, swung back in Rayo's favor in the last 15 minutes to keep the result in doubt until the final whistle.
Miguel "Michu" Perez slipped while shooting and sent the ball high in the 73rd. Two minutes later, Jose Casado's long blast forced Casillas to stretch and tip the ball wide, and Emiliano Armenteros had a great chance to equalise but failed to convert in front of an open net in the dying moments.
"Rayo didn't deserve to lose," said a gracious Jose Mourinho, who gave credit to his defense. "A draw would have been fair because they were a fantastic opponent. If we hadn't played so well in the back we wouldn't have won."
Also on Sunday, it was: Villarreal 2, Athletic Bilbao 2; Valencia 1, Sevilla 2; Osasuna 2, Granada 1 and Real Sociedad 1, Mallorca 0.