Joao Cancelo and Joao Felix made their Barcelona debuts as second-half substitutes as they edged out Osasuna for a dramatic La Liga win.
Jules Kounde scored the opening goal for the defending champions as he headed in from Ilkay Gundogan's corner at the end of the first half.
Chily Avila leathered in a lovely equaliser from the edge of the box.
But Robert Lewandowski scored a late winner from the penalty spot after he was fouled by Alejandro Catena.
Catena was initially booked, although it was upgraded to a red card by the video assistant referee.
Manchester City full-back Cancelo and Atletico Madrid forward Felix, both Portugal internationals, joined Barcelona on loan on deadline day.
It was a first La Liga appearance for 29-year-old Cancelo since his final Valencia game in August 2017.
Felix, who ended last season on loan at Chelsea, remains the third most expensive footballer ever after his £113m move from Benfica to Atletico in 2019.
Barcelona also brought on a third debutant, former Athletic Bilbao defender Inigo Martinez, late on.
They move onto 10 points from four games.
Meanwhile, Atletico's home match with Sevilla on Sunday was postponed because of torrential rain.
Several weather warnings have been issued across Spain as heavy rain causes major flooding across parts of the country with maximum red weather alerts in place in Madrid.