Dani Olmo got his dream debut with Barcelona, scoring a late winner to keep the Catalan club with a perfect record to start the Spanish league.
Olmo found the net in the 82nd minute with a low left-footed shot into the far corner after an assist by Lamine Yamal to give Barcelona a 2-1 come-from-behind win at Rayo Vallecano on Tuesday.
Barcelona is the only team with three wins after three rounds this season.
Olmo, who was only registered with the first team Tuesday morning after signing from Leipzig, entered the match at halftime to replace Ferran Torres.
“I was anxious to debut and it couldn't have been better,” Olmo said. “I'm glad I finally got to play and that I was able to help the team.”
The 26-year-old Spain international, a former member of Barcelona's famed La Masia youth academy, had come close to scoring in the 58th with a shot that hit the crossbar.
“Yeah, he scored the goal, this is why we are happy that he is in our team,” new Barcelona coach Hansi Flick said. “We deserved these three points.”
Rayo, celebrating its centennial this season, opened the scoring nine minutes into the match with Unai López finding the net from close range with a right-footed strike.
Two minutes after Olmo hit the crossbar, Pedri evened the match with a shot from near the penalty spot following an assist from Raphinha.
Barcelona striker Robert Lewandowski thought he had put Barcelona ahead in the 71st but his goal was disallowed by video review after a foul by Barcelona defender Jules Koundé in the buildup.
Flick said it was a “sad” victory because of a knee injury to 17-year-old midfielder Marc Bernal late into second-half stoppage time.
“We win, it's OK, but when you see the dressing room, no one is happy,” Flick said.
The game came a day after Rayo announced it signed Colombia playmaker James Rodríguez, who watched the match from the tribunes at Vallecas Stadium.
The 33-year-old Rodríguez had his contract with Brazilian club Sao Paulo rescinded after he led Colombia to a runner-up finish in the Copa America, where he had six assists and was named the tournament's most valuable player. He returns to the Spanish league four years after he left Real Madrid to join Everton in the Premier League.
Barcelona had started the season with victories at Valencia and against Athletic Bilbao at home. Rayo had opened with a 2-1 win at Real Sociedad and a 0-0 draw at Getafe.
Sevilla and Mallorca still winless
Sevilla drew 0-0 at Mallorca in a result that left both teams winless after three rounds. They had lost their opening matches this season.
Sevilla midfielder Saúl Ñíguez was sent off in the 89th for complaining with the referee.