text: The pre-tournament favourites - last knocked out of this competition in 1993 - had led when Isabel Kerschowski fired in early on.
  But Nadia Nadim nodded Denmark level after half-time and Theresa Nielsen's late header completed the comeback.
  It is only Germany's third loss in the 26-year history of the competition.
  The Olympic champions - ranked second in the world - created plenty of chances but were also frequently opened up at the back by a Denmark side who, after a nervy start, became increasingly dangerous.
  The opener came courtesy of a goalkeeping error, as Stina Lykke Petersen misjudged Kerschowski's fierce shot from the edge of the area and could only parry the German's shot in to the net.
  After the break, Germany hesitated when they thought they had conceded a free-kick only for the referee to play an advantage that Denmark took, with Portland Thorns forward Nadim jumping well at the far post to nod in the equaliser.
  Plenty of openings for both sides followed as the game became stretched with the prospect of extra time looming.
  Another right-wing cross found Nielsen unmarked in the Germany penalty area on 83 minutes and she headed in to spark wild Danish celebrations.
  The result guaranteed that the tournament will have a different winner for the first time since Norway's triumph in 1993, with Germany having won the following six European Championships.
  Media playback is not supported on this device
  The match had to be rescheduled for 11:00 BST on Sunday after torrential rain fell on Saturday night in Rotterdam.
  That meant the quarter-final was one of three to take place on Sunday.
  Austria beat Spain in a shootout after the sides drew 0-0, meaning they will face the Danes in the semis.
  And England beat France 1-0 to secure a meeting with hosts Netherlands, who booked their place in the last four on Saturday with a win over Sweden.
  Match ends, Germany 1, Denmark Women 2.
  Second Half ends, Germany 1, Denmark Women 2.
  Attempt missed. Isabel Kerschowski (Germany) right footed shot from outside the box is too high.
  Corner,  Germany. Conceded by Theresa Nielsen.
  Offside, Denmark Women. Pernille Harder tries a through ball, but Nadia Nadim is caught offside.
  Delay over. They are ready to continue.
  Substitution, Germany. Lena Petermann replaces Linda Dallmann.
  Delay in match Theresa Nielsen (Denmark Women) because of an injury.
  Attempt saved. Anja Mittag (Germany) left footed shot from outside the box is saved in the centre of the goal. Assisted by Anna Blässe.
  Attempt blocked. Lena Goeßling (Germany) left footed shot from outside the box is blocked.
  Attempt blocked. Linda Dallmann (Germany) left footed shot from outside the box is blocked. Assisted by Lina Magull.
  Attempt missed. Nadia Nadim (Denmark Women) right footed shot from the left side of the box is close, but misses to the right. Assisted by Katrine Veje.
  Goal!  Germany 1, Denmark Women 2. Theresa Nielsen (Denmark Women) header from the centre of the box to the top left corner. Assisted by Frederikke Thøgersen with a cross.
  Foul by Dzsenifer Marozsán (Germany).
  Nadia Nadim (Denmark Women) wins a free kick in the defensive half.
  Corner,  Germany. Conceded by Sanne Troelsgaard.
  Attempt blocked. Lina Magull (Germany) right footed shot from outside the box is blocked. Assisted by Isabel Kerschowski.
  Delay over. They are ready to continue.
  Delay in match Nadia Nadim (Denmark Women) because of an injury.
  Attempt missed. Anja Mittag (Germany) header from the centre of the box is just a bit too high. Assisted by Sara Däbritz with a cross.
  Attempt missed. Anja Mittag (Germany) right footed shot from outside the box misses to the right. Assisted by Lina Magull.
  Attempt blocked. Sara Däbritz (Germany) left footed shot from outside the box is blocked.
  Substitution, Denmark Women. Cecilie Sandvej replaces Line Røddik Hansen.
  Mandy Islacker (Germany) wins a free kick in the defensive half.
  Foul by Line Røddik Hansen (Denmark Women).
  Substitution, Denmark Women. Frederikke Thøgersen replaces Maja Kildemoes.
  Offside, Germany. Isabel Kerschowski tries a through ball, but Mandy Islacker is caught offside.
  Attempt blocked. Lina Magull (Germany) right footed shot from outside the box is blocked. Assisted by Linda Dallmann.
  Offside, Denmark Women. Line Jensen tries a through ball, but Pernille Harder is caught offside.
  Substitution, Germany. Mandy Islacker replaces Kristin Demann.
  Corner,  Germany. Conceded by Stina Lykke Petersen.
  Attempt saved. Linda Dallmann (Germany) right footed shot from the centre of the box is saved in the bottom left corner. Assisted by Kristin Demann.
  Attempt missed. Pernille Harder (Denmark Women) left footed shot from the left side of the box misses to the right. Assisted by Line Jensen.
  Attempt blocked. Nadia Nadim (Denmark Women) left footed shot from outside the box is blocked. Assisted by Simone Sørensen.
  Foul by Babett Peter (Germany).
  Nadia Nadim (Denmark Women) wins a free kick on the right wing.
  Almuth Schult (Germany) wins a free kick in the defensive half.
  Foul by Pernille Harder (Denmark Women).
  Katrine Veje (Denmark Women) hits the bar with a left footed shot from very close range. Assisted by Nadia Nadim with a cross.
  Corner,  Germany. Conceded by Stina Lykke Petersen.
target: Germany's bid for a seventh consecutive European Championship title is over after Denmark fought back to win an entertaining Euro 2017 quarter-final.