A poor France side went down tamely to Sweden 2-0 in their final Group D match, but still progressed to the quarterfinals.
Laurent Blanc's side will now take on defending champions Spain after England's victory against Ukraine saw the English top their group. Roy Hodgson's team face Italy in the quarters.
Sweden, who were already eliminated before the final game, scored through Zlatan Ibrahimovic and Sebastian Larsson.
France looked like a pale shadow of the side that had gone 23 games unbeaten, surrendering to Sweden easily and had it not been for a man of the match performance by goalkeeper Hugo Lloris, the Euro 2000 champions could have lost by a lot more.
Ibrahimovic scored his first goal of the tournament in his final game, but it was worth the wait. Larsson sent in a ball in from the right, which saw the AC Milan striker slam a magnificent volley from 16 yards out.
Sweden then put the game to bed in the dying moments, when Christian Wilhemsson saw his shot come of the cross bar, only for Larsson to slam home the rebound and give the Swedes a deserved win.
Blanc lamented his side's performance and said Sweden were the better side in every aspect of the game. "We were not strong enough in the tackles. I think Sweden played with a lot of heart, they gave everything, physically they were much better than us.
"We did not suffer up front, we suffered a great deal at the back and also in the midfield. Sweden had a lot of physical impact there.
"I'm going to look at the game again but I think we conceded too much space."
Blanc admitted France will have to play a lot better if they are to have any chance against Spain. "The aim tonight was to win and finish first in the group, but we were not able to do that and we must just deal with it," Blanc said.
"The problem with Spain is that they don't give you the ball. We need to get at them on the counterattack and cause problems for them that way. Croatia showed us the way to do it. They didn't have the ball much, but when they did, they used it well and, in my opinion, that is what we need to do.
"But we must be realistic. In Spain, we will be meeting one of the best teams in the Euros, and also, in my opinion, the world."
Blanc came out in support of Karim Benzema, who has not found the net in the Euros so far. "Benzema needed to score, as did all our forwards. He tried many things but he just could not score. I hope that he breaks his duck against the Spanish in the quarters.
"But I don't like to talk too much about individuals. Tonight, everyone had a bad game and I will not dwell on the performances of individual players."
Sweden coach Erik Hamren was proud of his side's display. "My philosophy as a coach is that if you behave like a winner, you're going to be a winner. Sometimes it takes time because of the circumstances, but you're going to be a winner.
"For me the players have been winners, even when we lost."