Lionel Messi had a penalty saved after scoring from the spot as Barcelona struggled to end a run of poor results before it turns to the Champions League knockout rounds.
Messi's first penalty opportunity proved good enough in an uninspiring 1-0 victory over Valladolid at Camp Nou in the Spanish league on Saturday. But Barcelona's all-time leading scorer had a second spot-kick stopped by goalie Jordi Masip.
Barcelona, which had drawn three games in a row across all competitions, visits Lyon on Tuesday in the opening leg of their Champions League round-of-16 tie.
Messi and his teammates missed chances to put away Valladolid, and when they did arrive Masip was up to the challenge.
Messi beat Masip with a perfectly executed spot-kick two minutes before halftime. But Masip, a former Barcelona backup, smothered his second strike that Messi sent to the same left side of the goalie.
Masip said he didn't learn any tricks to stopping Messi when they used to practice together.
"I don't know, I (never saved) many of his penalties," Masip said. "He took the first one very well, but I was able to stop the second one. It is bittersweet. We had the chance to take a draw."
Barcelona increased its league lead to seven points over Atletico, which moved past Real Madrid into second place before its crosstown rival plays on Sunday.
Atletico's 1-0 win at Rayo Vallecano thanks to a late goal by Antoine Griezmann broke a run of consecutive losses before Atletico hosts Juventus on Wednesday in the Champions League.
UGLY WIN
Messi took his league-leading tally to 22 goals with his 30th in all competitions this season.
Otherwise, it was a night of missed chances and erred passes by Barcelona.
"We didn't play well. Getting back to winning is, of course, positive, but if we don't correct our mistakes we will pay for it on Tuesday," said Gerard Pique, who sustained Barcelona in defence and earned the penalty that Messi did convert two minutes before halftime.
"If we don't play the ball quickly and have more possession (...) we become a weaker team. We know it and our opponents know it."
Coach Ernesto Valverde gave Kevin-Prince Boateng his second start since joining Barcelona last month as Luis Suarez and Philippe Coutinho rested until midway through the second half.
Besides saving Messi's spot-kick, Masip also made an excellent one-handed save to parry a Messi volley and denied Suarez one-on-one.
"We had the chance with the second penalty to put it away, but Masip played superbly and we had to sweat it out until the end," Valverde said. "We needed to pass the ball more quickly in the first half. But if we generate the scoring opportunities as we had in the second half they will eventually go in."
GRIEZMANN GETS WIN
Griezmann's late goal was about all Atletico could muster in attack to edge crosstown minnow Vallecano.
Diego Costa played the final half hour for Atletico in his first action since recovering from a left-foot injury that required surgery in December.
Atletico, a runner-up in the Champions League in 2014 and 2016, is eager to reach the June 1 final hosted at its home stadium, the Wanda Metropolitano.
But Cristiano Ronaldo's Juventus is standing in the way.
"It was fundamental to win here," said Morata, who used to play for Juventus and helped it reach the 2015 Champions League final. "Now Wednesday's match is almost here and nothing else matters, because the Champions League trumps all the rest."
OTHER RESULTS
Levante won at Celta Vigo 4-1 and piled pressure on coach Miguel Cardoso. Celta has lost seven of its last eight games to leave it one point above the relegation zone.
Real Sociedad eased past Leganes 3-0 at home.