Germany defeated Italy 6-5 on penalties after the match finished 1-1 in extra time, enabling the team to progress to the Euro semifinals.
Germany defeated old rivals Italy 6-5 in a penalty shootout at Euro 2016 with a winning spot kick from Jonas Hector after the game finished 1-1 following extra time on Saturday to reach the semi-finals.
They will now face the winners of the other quarter-final between hosts France and Iceland, who play on Sunday.
Germany midfielder Mesut Ozil, who had experienced a quiet tournament so far, was in the right place to open the scroring in the 65th minute when he turned in Jonas Hector's cutback after good work from Mario Gomez down the left.
The Italians, however, levelled with a 78th minute penalty from Leonardo Bonucci after Jerome Boateng handled the ball.
Germany, who had not conceded a goal in their previous four tournament matches here, took their time to get going against a well-oiled defence with Thomas Mueller having their best chance before Ozil broke the deadlock after more than an hour.
Bonucci gave Germany goalkeeper Manuel Neuer no chance 13 minutes later with a well-placed penalty as Italy, who eliminated holders Spain in the last 16, refused to buckle and sent the game into extra-time and a penalty shootout.
The eventful shootout, with seven players failing to convert their kicks, left pundits dismayed with some saying it was the worst set of penalties ever seen at a major finals.
"I can still speak," said breathless Germany keeper Manuel Neuer, who saved two spot kicks as the world champions won 6-5 on penalties after a dull 1-1 draw over 120 minutes.
"Well we have finally succeeded against Italy and now we've done it in a knockout game. It was real drama. I have never seen anything like it before. As a goalkeeper it is something I will always remember."
Mats Hummels, who scored in the shootout, said the game had been intense with Germany sitting too far back after they opened the scoring through Mesut Ozil in the 65th minute.
"After 1-0 we had thought we could have won it but for a short amount of time we lost our security," he said. "We were always afraid one situation could change the match."
That was the case as Jerome Boateng handled and Italy's Leonardo Bonucci scored from the spot to level in the 78th.
Italy coach Antonio Conte said he was disappointed to go out despite his defensively-minded team showing little adventure in the final third of the pitch during the match.
"The lads gave everything. We had a very strong team. I can't find the words. We were beaten by Germany on penalties and that hurts," he said.
"I regret that we didn't make the penalties. Everyone fought hard, everyone. I don't think we could have done any more. We gave everything we had."
However, the game will probably be remembered for some of the poorest spot kicks ever taken in a shootout.
"Some of those penalties were the worst I've ever seen, and the run ups, what were they about?," said former England striker Alan Shearer.
Former France captain Thierry Henry was particularly scathing about Italy's Graziano Pelle, who told the keeper he was going to dink the ball and missed the target altogether.
"Obviously I'm happy about this," said relieved Germany coach Joachim Loew. "The tournament isn't over. It's going to continue for us now.
"We've practised penalties a lot. It's tough on the nerves to run from midfield to take the shots. The youngsters really did a great job for us tonight [on the penalties]," he said.