BERLIN — Borussia Dortmund survived late VAR drama to reach the quarterfinals of the German Cup on Tuesday, while Bayer Leverkusen was stunned by fourth-tier Rot-Weiss Essen.

Dortmund endured a nervy finale as Erling Haaland sealed a 3-2 win in extra time over second-division Paderborn.

The Norwegian thought he’d won it in normal time when he made it 3-1 for Dortmund on a counterattack.

But referee Tobias Stieler was alerted to a foul by Felix Passlack on Paderborn captain Sebastian Schonlau at the other end. Stieler consulted video replays and awarded the penalty. Haaland’s goal was duly chalked off and Paderborn forward Prince Osei Owusu equalized from the spot in the seventh minute of injury time to send the game to extra time.

“I hope that it was a great cup evening for the viewers. For us it was hard,” Dortmund midfielder Thomas Delaney told broadcaster ARD.

As if in defiance of the call disallowing his goal, Haaland raced clear to score another in similar fashion to make it 3-2 in the fifth minute of extra time.

There was another lengthy delay for the next VAR check to see if the Norwegian was offside for Delaney's pass. This time the goal was allowed, however, as Stieler determined there was a touch from a Paderborn player before the ball reached Haaland, who looked offside otherwise.

“I don't see the ball changing course. It's an absolute insult," Paderborn coach Steffen Baumgart said. “We have the pictures. He can look at them 20 times. To make a touch of the ball out of that is brazen.”

Emre Can opened the scoring in the ninth minute when Paderborn’s defence failed to deal with Jadon Sancho’s corner. The ball kept coming back before falling kindly for Can to let fly with his left boot to score.

Haaland sent Sancho on his way to score Dortmund’s second in the 16th and it looked like Dortmund would go on to another stroll after a 5-0 win over Duisburg and 2-0 win over Eintracht Braunschweig in the previous rounds.

But Paderborn improved and a mistake from goalkeeper Marwin Hitz allowed Julian Justvan to pull one back with just over 10 minutes of normal time remaining.

Owusu's penalty sent it to extra time and Dortmund finished the match holding on for the final whistle as Justvan fired over with the last kick of the game.

LEVERKUSEN KNOCKED OUT

Rot-Weiss Essen struck twice in extra time to knock Leverkusen out with a 2-1 defeat.

Leverkusen, last year’s beaten finalist, struck the post four times while missing a host of chances before Leon Bailey finally broke the deadlock in the 105th minute. The Jamaican forward stayed cool and side-footed inside the far post.

However, Essen midfielder Oguzhan Kefkir equalized three minutes later and Simon Engelmann completed a remarkable turnaround when he netted the winner in the 117th.

Leverkusen complained that new signing Timothy Fosu-Mensah was fouled in the buildup, but hopes of a last-minute reprieve were thwarted when the goal was cleared by the video referee.

Holstein Kiel, which knocked out defending champion Bayern Munich in the previous round, defeated second-division rival Darmstadt 7-6 in a penalty shootout after their third-round game ended 1-1 with extra time.

Werder Bremen defeated second-division Greuther Fürth 2-0.

___

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports

___

Ciarán Fahey on Twitter: https://twitter.com/cfaheyAP