Borussia Dortmund survived an uncomfortable night to reach the quarterfinals of the Champions League 5-4 on aggregate despite losing 2-1 to Zenit St Petersburg at the Westfalenstadion on Wednesday.

A 4-2 win in St Petersburg three weeks ago made last year’s Champions League finalists huge favorites to make the last eight. But Jurgen Klopp’s side struggled to assert themselves in the return leg and were grateful for a Sebastian Kehl headed goal late in the first half that canceled out an early wonder goal from Hulk. Salomon Rondon’s goal 17 minutes from time came too late to give Zenit a chance to get the two goals they still needed.

The Russian side had parted with coach Luciano Spalletti since the first leg, with his replacement Andre Villas-Boas set to take over from Thursday. And the former Chelsea and Tottenham manager will doubtless be encouraged by what he saw from his new team.

There were chances at both ends in an entertaining start in Germany. Pierre-Emerick Aubameyang and Robert Lewandowski had openings for the home side, while Alex Witsel tested Roman Weidenfeller. But the Dortmund keeper was beaten in spectacular fashion in the 16th minute. Brazilian Hulk lived up to his reputation with a storming run cutting in from the right before unleashing a ferocious drive that bent away off his left foot and past the bewildered Weidenfeller.

Oleg Shatov shot narrowly past the post soon after but Zenit were unable to build on their lead. And seven minutes before the interval Dortmund got a goal that all-but ended the visitors’ hopes. Marcel Schmelzer swung in a cross from the left and captain Kehl rose above a defender to send a header down into the turf and past Vyacheslav Malafeev despite the Zenit goalkeeper getting two hands to the ball.

While Rondon took advantage of some static Dortmund defending to stoop and header home late on, it was too little too late. Dortmund move on, but will need to be much improved if they are to match their eye-catching run of last season.

Borussia Dortmund 0-1 Zenit Petersburg (Goal Hulk) by all-goals

Borussia Dortmund 1-1 Zenit Petersburg (Goal... by all-goals

Borussia Dortmund 1-2 Zenit Petersburg (Goal... by all-goals