Robert Lewandowski rolled home a late penalty to earn Barcelona a hard-fought 2-1 win at Osasuna in La Liga on Sunday.
The striker won the penalty when he was tugged back in the box by Alejandro Catena, who was sent off.
Barcelona took the lead through Jules Kounde's header in the first half but Chimy Avila drilled the hosts level with less than 15 minutes remaining.
Xavi brought on new loan signings Joao Cancelo and Joao Felix in the second half as Barcelona, third, stayed on league leaders Real Madrid's tail -- they are two points behind their arch-rivals after four games.
The coach started 16-year-old Lamine Yamal on the right wing again after his impressive display last weekend and his first call up to the Spanish national team on Friday.
Barca should have taken the lead early on but Lewandowski fired wide with the goal gaping after Frenkie de Jong's effort rebounded off the post into his path.
Osasuna, often hard to beat at home, offered as good as they got in the first half.
Marc-Andre ter Stegen denied former Barcelona forward Jose Arnaiz at his near post and then thwarted Aimar Oroz, who should have done better when well placed.
Barcelona snatched the lead just before half-time when Kounde rose to nod Ilkay Gundogan's corner across goal and beyond the dive of Aitor Fernandez.
Xavi brought on new arrival Joao Cancelo just before the hour mark, with his Portuguese compatriot Joao Felix having to wait until the final stages for his debut.
By then Osasuna were level, with Avila dribbling across the face of the box without sufficient interference and firing past Ter Stegen.
Last season's top scorer in La Liga, Lewandowski, who was having another frustrating night, turned it around by winning and converting a penalty to restore Barcelona's lead.
The Polish forward hit the deck after Catena pulled his arm back, and the defender was sent off after a long VAR review, before the 35-year-old sent Fernandez the wrong way from the spot.
Girona climbed to second earlier Sunday after Portu's late strike earned the Catalan side a 1-0 win against promoted side Las Palmas, 18th.
The winger returned to Girona from Getafe this summer and made a swift impact after being given his second 'debut' as a substitute.
Atletico Madrid's game against Sevilla was called off because of expected torrential rain in the Spanish capital, although the predicted downpour did not materialise in the time the game was scheduled to take place.
League leaders Real Madrid beat Getafe 2-1 on Saturday with another late Jude Bellingham winner, maintaining their 100 percent start to the season.