A stunning late goal from 19-year-old substitute Nico gave Barcelona three precious points as they beat Elche 3-2 at Camp Nou with manager Xavi Hernandez paying tribute to his young stars.
After two league games without a win and a humiliating 3-0 loss to Bayern Munich that knocked them out of the Champions League in the group stage for the first time in almost two decades, Barca were desperate for a win.
The started well and arguably had their best 45 minutes of the season in the first half, with Xavi's bet on his younger players appearing to pay off as Spanish youngsters Ferran Jutgla and Gavi both scored early on.
With strikers Memphis Depay and Ansu Fati hurt, Jutgla leapfrogged veteran Luuk de Jong as the starter up-front, and he sent in the first goal with a header from an Ousmane Dembele corner.
Four minutes later, teenage sensation Gavi scored the first goal of his professional career to double Barca's lead.
But in the second half, Elche scored twice in two minutes through Tete Morente and Pere Milla, and it looked like Barca's recent run of nightmare games was set to continue.
But Dembele found Gavi breaking through Elche's defensive line in the 85th minute, and the young international cut the ball back to Nico inside the area, who blasted the ball into the roof of the net.
The win lifts Barca one spot in the standings to seventh, two points off the European qualifying places but still 15 points behind league leaders Real Madrid.
"Gavi, Nico, Abde, (Ronald) Araujo, (Alex) Balde, they are the future of the club," Xavi said. "I played here when I was 18 and I was scared but they let their personality show."
Gavi was particularly impressive, and Xavi added: "What's surprising is his age, he's 17 and look how he competes.
"Today he made the difference with a goal and an assist. More than anything his work is spectacular. We're happy to have him and I don't want to compare him to anyone. There's no ceiling for him."
"We will fight to finish in the top four, and surely this victory will give us energy to climb up (the table)," Nico said after the match.
Elche, who have lost half their league games this season, could end up in the relegation zone by the end of the weekend.