Argentina are through to the World Cup quarter-finals after Angel Di Maria scored in the 118th minute to give them a 1-0 win against Switzerland.
With a penalty shootout looming, Lionel Messi made a surging run towards the Swiss area and laid the ball off to Di Maria on the right, and the winger sent a left-foot shot past diving goalkeeper Diego Benaglio.
Blerim Dzemaili nearly equalised right before the end of extra time but his header hit the post, and the rebound bounced off his knee and wide of the goal.
Argentina will play the winner of Belgium and the United States.
It was a dramatic ending to what had been a tight match, with Argentina struggling to break through Switzerland's disciplined defence.
Though Argentina dominated possession from the start, it was Switzerland that had the best chances in the slow-paced first half. Xherdan Shaqiri cut in from the left in the 28th and found Granit Xhaka in the middle of the penalty area, but Sergio Romero stopped Xhaka's shot with his left foot.
Alone with Romero, striker Josip Drmic wasted a chance to score 10 minutes later with a botched attempt to chip over the Argentina goalkeeper.
Argentina's attack improved after the break when fullback Marcos Rojo launched raids down the left flank, feeding crosses to the Argentine attackers.
Just after the half-hour mark Gonzalo Higuian finally got an attempt on target as he connected with Rojo's cross, forcing Benaglio to a fingertip save.
In the 78th, Messi tested Benaglio again as he dribbled into the area and struck a low shot that the Swiss goalkeeper stopped at his right post.
Benaglio kept Switzerland in the game when he got a hand on Di Maria's shot in 109th minute, but he had no chance on the Argentina player's winner.