Overcoming a lackluster performance and benefiting from a video review that took away an early goal from its opponent, Barcelona salvaged a 2-1 win over gritty Getafe in a match between the second and third teams in the Spanish league on Saturday.
Getafe put on a tough fight at the Camp Nou, missing some clear chances and seeing a goal called back by VAR halfway through the first half. But Antoine Griezmann and Sergi Roberto scored goals five minutes apart before the break to give Barcelona a big enough gap to hold on for the victory.
It was Barcelona's second consecutive league win since pressure grew on new coach Quique Setién following the team's elimination against Athletic Bilbao in the Copa del Rey quarterfinals.
The victory left second-place Barcelona tied on points with Real Madrid at the top of the standings ahead of leader Madrid's home match against relegation-threatened Celta Vigo on Sunday.
Getafe, which was coming off four straight league wins, stayed 10 points behind the two Spanish powerhouses. It kept a two-point advantage over fourth-place Atlético Madrid, which drew 2-2 at Valencia on Friday.
Getafe, a modest club from southern Madrid, has been the league's sensation for the second straight season and is again in contention for a Champions League spot. It made the Europa League last season, a competition where it hosts Ajax in the first leg of the round of 32 on Thursday.
Getafe was the most dangerous team early on at the Camp Nou, creating good opportunities on counterattacks. Forward Jorge Molina had one of the best chances in a one-on-one situation, but his shot was blocked at the last moment.
Getafe thought it had scored with a close-range shot by defender Allan Nyom following a cross into the area in the 23rd minute, but the goal was disallowed after video review saw a foul by Nyom on Barcelona defender Samuel Umtiti.
Barcelona improved gradually and Griezmann opened the scoring after a beautiful one-touch pass by Lionel Messi in the 34th. The France forward entered the area and flicked the ball over Getafe goalkeeper David Soria as he charged from his net.
Sergi Roberto added to the lead in the 39th with a low shot from inside the area after a low cross by Junior Firpo.
Getafe wasn't giving up, though. Ángel Rodríguez, who has been linked to a transfer to Barcelona, pulled the visitors closer with a neat volley from inside the area in the 66th, and Barcelona goalkeeper Marc-André ter Stegen prevented the equalizer five minutes later by making two consecutive great saves.
Messi, trying to end a three-game scoreless streak, almost found the net with a close-range header saved by Soria just before halftime.
Barcelona defender Jordi Alba had to be replaced halfway through the first half because of an apparent muscle injury.
Mallorca beat Alavés 1-0 to end a four-match losing streak and move out of the relegation zone.
Young Colombian Cucho Hernández scored a 63rd-minute winner to leave the hosts a point from safety.
Mallorca had a goal disallowed by video review early in the second half and missed a penalty kick in the first half.
Alavés stayed in 14th place.