Pedri’s solitary goal gave Barcelona all 3 points against Celta Vigo and helped the Catalans return to the top of La Liga on goal difference.
After Gavi’s left-wing cross was blocked, the 19-year-old made the fastest reaction to score his second goal of the year by turning home from three yards.
Barca put up a disjointed effort, and Celta pushed after falling down and came dangerously near when Jorgen Strand Larsen’s header was overturned.
Goncalo Paciencia struck a post, and Iago Aspas had a shot blocked.
With a 1-0 victory over Getafe on Saturday, Real Madrid had risen to the top of the league.
The two teams will square off in the inaugural El Classico of the season on Sunday with both teams having won seven and drawn one of their first eight league games (15:15 BST).
Barcelona, who have lost two of their opening three Champions’ League group games, started strongly with former Manchester City winger Ferran Torres curling wide before summer signings Raphinha and Robert Lewandowski saw efforts saved.
While Celta improved after falling behind but failed to display a clinical edge in the final third to gain a deserving point, Xavi’s team struggled to maintain coherence and quality for significant portions of the game.