Serhou Guirassy scored the winner with seven minutes remaining to send Borussia Dortmund past St Pauli 2-1 at home in the Bundesliga on Friday.
Leading by a goal after Ramy Bensebaini’s excellent first-half header, Dortmund were pegged back by an excellent long-range effort from Eric Smith to level things up with 12 minutes remaining.
Guirassy stepped up in the dying stages, heading in an inch-perfect Jamie Gittens cross to put Dortmund back in front.
The Guinean, who joined Dortmund in the summer, now has 12 goals in his past eight games for club and country.
Top of the Champions League table after two games, Dortmund face off against Real Madrid on Tuesday, the side who beat them 2-0 at Wembley in last season’s final.
“It wasn’t easy. In the first half we had a bit of luck, but we had chances of our own and could have scored more. We’re happy and also relieved,” Dortmund midfielder Julian Brandt told DAZN.
“The goal we conceded was an absolute dream goal. The lads did well. I don’t think we can complain today.”
St Pauli striker Johannes Eggestein lamented “luck wasn’t on our side today.”
Dortmund came into the game unbeaten in their past 38 home games on a Friday, dating back to 2004.
St Pauli, promoted in summer after 13 years in the second division, had struggled on their return to the top flight, winning just one of their opening six matches.
The hosts kept the ball and put pressure on the visitors, Guirassy going close to opening the scoring after five minutes when he broke behind the Pauli defensive line and forced a save from Nikola Vasilj.
Pauli had the ball in the net just after the half-hour mark when Morgan Guilavogui got a boot to a curling free kick, but the forward was narrowly offside.
Dortmund got their noses in front just before halftime, Bensebaini leaping to head in a Pascal Gross cross.
Pauli equalised on the 78-minute mark when Smith blasted in an incredible shot from well outside the box.
Sensing another poor league result, Dortmund clicked into gear and pushed forward, Guirassy leaping high to head in a Gittens cross five minutes later.
On Saturday, league leaders Bayern Munich host Stuttgart while RB Leipzig – second on goal difference – travel to Mainz. Champions Bayer Leverkusen play at home against Eintracht Frankfurt.