Gonzalo Castro made an immediate impact off the bench to set Borussia Dortmund on their way to a 5-0 DFB-Pokal second-round win at Magdeburg on Tuesday.

Holders Dortmund were insipid for much of the first half against their third-tier hosts until Castro entered as a 41st-minute substitute for Mahmoud Dahoud and 32 seconds later converted with his first touch.

Castro was the beneficiary of an assist from Alexander Isak, and the teenage Sweden international marked his first Dortmund start with his maiden goal early in the second half with a calm finish.

Andriy Yarmolenko's penalty, Marc Bartra's header and Shinji Kagawa's neat finish inside the final 20 minutes capped a satisfactory outing for Peter Bosz's side, who came into this clash with one win from five in all competitions.

That run had allowed Bayern Munich to catch them atop the Bundesliga as well as leaving their Champions League hopes in tatters, but they can at least console themselves with an assured passage to the Pokal third round, safe in the knowledge one of their main rivals is set to bow out on Wednesday as RB Leipzig host Bayern.

The home fans produced a spectacular pre-match display inspired by the Saw movie franchise, depicting the Jigsaw mask along with with the message "You think it's over, but the games have only just begun".

But if Dortmund were meant to be intimidated there were few signs of any fear as the visitors ought to have taken the lead inside three minutes.

Magdeburg failed to clear a corner and Bartra teed up Maximilian Philipp, who struck the post with the goal gaping from six yards and Isak's rebound was brilliantly denied by the feet of Alexander Brunst.

The Magdeburg goalkeeper was called into action again midway through the half, keeping out Yarmolenko at his near post.

As half-time approached Dahoud walked from the field nursing a neck injury, with Dortmund later confirming he had been taken to hospital as a precaution, and his replacement Castro timed his run into the box and steered Isak's knockdown beyond debutant Brunst from six yards.

The lead was doubled within two minutes of the restart as Dortmund broke from a corner and Philipp fed Isak, who slipped his finish between the legs of Brunst.

Nuri Sahin stung the palms of the keeper from just outside the box but the game was made safe in the 73rd minute as Yarmolenko converted his spot-kick after Steffen Schafer handled Raphael Guerreiro's cross.

Bartra glanced in Kagawa's delivery six minutes later and the Japan international slotted home right at the end to give the scoreline a somewhat harsh appearance as Dortmund made light of resting top scorer Pierre-Emerick Aubameyang.