Second-division leader St. Pauli knocked defending champion Borussia Dortmund out of the German Cup with a 2-1 win in their third-round game on Tuesday.

An early goal from Etienne Amenyido, an Axel Witsel own goal and resolute defending from the home team ensured Dortmund joined Bavarian powerhouse Bayern Munich as an early casualty in a competition that both were targeting to win.

More Images
Dortmund's Erling Haaland leaves the pitch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Second-division leader St. Pauli knocked defending champion Borussia Dortmund out of the German Cup with a 2-1 win in their third-round game on Tuesday.

Dortmund's Marco Reus, left, leaves the pitch as teammate Erling Haaland, right, greets ST. Pauli's keeper Dennis Smarsch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

St. Pauli got off to a flying start with Amenyido opening the scoring in the fourth minute.

Dortmund's Erling Haaland, left, and Marco Reus, center, greets ST. Pauli's keeper Dennis Smarsch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

St. Pauli’s defense held firm as Dortmund lacked a cutting edge despite its attacking firepower. Dortmund coach Marco Rose sent on 17-year-old forward Youssoufa Moukoko for three minutes of injury time, but it was Moukoko’s former club that progressed.

Dortmund's Marco Reus reacts after his team received the opening goal during the German Soccer Cup round of 16 match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Kainz had to score with Cologne’s fifth penalty to keep his team in the game, but the Austrian slipped as he took it and his right-footed shot came off his left boot before looping in over Hamburg ’keeper Daniel Heuer Fernandes.

Dortmund's head coach Marco Rose gives instructions during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Also, Bochum defeated Bundesliga rival Mainz, and Karlsruher SC defeated third-division 1860 Munich 1-0 away.

Dortmund's Marco Reus, center, shoots the ball next to ST. Pauli's Jakov Medic, right, and goalkeeper Dennis Smarsch during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

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

Dortmund's Erling Haaland, top, out jumps ST. Pauli's Jakov Medic for a header during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland, top, out jumps ST. Pauli's Jakov Medic for a header during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland warms up prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland warms up prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

A St. Pauli supporter holds up a scarf as he cheers prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

A St. Pauli supporter holds up a scarf as he cheers prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Bayern was knocked out with a 5-0 loss at Borussia Mönchengladbach in the second round. Dortmund won last season's final in May with a 4-1 win over Leipzig.

Dortmund's Erling Haaland leaves the pitch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland leaves the pitch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

St. Pauli got off to a flying start with Amenyido opening the scoring in the fourth minute.

Dortmund pushed hard for an equalizer but was caught out again five minutes before the break when Witsel deflected Guido Burgstaller’s cross for the lurking Amenyido inside his own goal.

Erling Haaland pulled one back with a penalty early in the second half after Jakov Medić was penalized through VAR for handball.

Dortmund's Marco Reus, left, leaves the pitch as teammate Erling Haaland, right, greets ST. Pauli's keeper Dennis Smarsch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Dortmund's Marco Reus, left, leaves the pitch as teammate Erling Haaland, right, greets ST. Pauli's keeper Dennis Smarsch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

St. Pauli’s defense held firm as Dortmund lacked a cutting edge despite its attacking firepower. Dortmund coach Marco Rose sent on 17-year-old forward Youssoufa Moukoko for three minutes of injury time, but it was Moukoko’s former club that progressed.

Only 2,000 fans were allowed in the 29,546-capacity Millerntor Stadium due to coronavirus restrictions. There was a big reception for the home team outside with flares and fireworks to show encouragement, and those allowed inside did their best to compensate for those absent.

Earlier, Hamburger SV reached the quarterfinals thanks to an unfortunate penalty kick from Cologne midfielder Florian Kainz in their shootout.

Dortmund's Erling Haaland, left, and Marco Reus, center, greets ST. Pauli's keeper Dennis Smarsch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland, left, and Marco Reus, center, greets ST. Pauli's keeper Dennis Smarsch at the en of the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Kainz had to score with Cologne’s fifth penalty to keep his team in the game, but the Austrian slipped as he took it and his right-footed shot came off his left boot before looping in over Hamburg ’keeper Daniel Heuer Fernandes.

Referee Daniel Schlager ruled the score was irregular and ended the game with Hamburg winning the shootout 4-3.

Cologne striker Anthony Modeste’s penalty in injury time of extras time had sent the game to penalties.

Dortmund's Marco Reus reacts after his team received the opening goal during the German Soccer Cup round of 16 match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Marco Reus reacts after his team received the opening goal during the German Soccer Cup round of 16 match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Also, Bochum defeated Bundesliga rival Mainz, and Karlsruher SC defeated third-division 1860 Munich 1-0 away.

Gladbach visits second-division Hannover on Wednesday, when Hertha Berlin hosts Union Berlin for a derby.

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

Dortmund's head coach Marco Rose gives instructions during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

Dortmund's head coach Marco Rose gives instructions during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. St. Pauli won 2-1. (AP PhotoMartin Meissner)

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

Dortmund's Marco Reus, center, shoots the ball next to ST. Pauli's Jakov Medic, right, and goalkeeper Dennis Smarsch during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Marco Reus, center, shoots the ball next to ST. Pauli's Jakov Medic, right, and goalkeeper Dennis Smarsch during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland, top, out jumps ST. Pauli's Jakov Medic for a header during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland, top, out jumps ST. Pauli's Jakov Medic for a header during the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland warms up prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

Dortmund's Erling Haaland warms up prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

A St. Pauli supporter holds up a scarf as he cheers prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)

A St. Pauli supporter holds up a scarf as he cheers prior the German Soccer Cup round of 16 soccer match between FC St. Pauli and Borussia Dortmund in Hamburg, Germany, Tuesday, Jan. 18, 2022. (AP PhotoMartin Meissner)