Kiev: France will play Spain in the Euro 2012 quarter-finals after surrendering their Group D top-spot to England by losing against Sweden.
Erik Hamren's men, who have already had their elimination confirmed after losing both of their games so far, frustrated the French side in the first-half and through Ola Toivonen had two excellent chances to take the lead, but he failed to hit the target on both occasions.
Les Bleus looked very flat in the first-half, with Franck Ribery forcing Andreas Isaksson into his only save of the period, as they looked nothing like the attacking threat that beat Ukraine 2-0, allowing the Swedes to keep things level at the break.
After the break it was Sweden who looked the better side and deservedly took the lead when Zlatan Ibrahimovic volleyed home superbly, with Wilhelmsson nearly adding a second soon after. The Swedes then defended well, and even knicked a thrid through Sebastian Larsson, forcing France to qualify as group runners-up with England beating Ukraine.
Laurant Blanc made two changes from the 2-0 win over co-hosts Ukraine, with Hatem Ben Arfa starting for the first time in the competition in place of Jeremy Menez, who is a booking away from suspension. Yann M'Vila returned from injury to replace another Newcastle man in the French ranks, Yohan Cabaye, who has been struggling with a leg problem this week.
The Swedes also made two replacements from their last game, a 3-2 defeat at the hands of England, with Rasmus Elm (knee) and Joham Elmander (foot) being forced out with Ola Toivonen and Emir Bajrami coming into the side.
France started rather shakily at the back as sluggish defending from the two centre-backs allowed Toivonen to get his head on Martin Olsson's cross, however the ball sailed wide of the mark. Then, Sebastian Larsson again beat his man to head a cross towards goal but his effort turned out too tame to trouble Hugo Lloris.
The opening stages saw France create a number of chances for themselves as firstly Karim Benzema slipped Ben Arfa beyond the last man but the Magpies man tried an ambitious shot from a tight angle, skewing the ball off-target.
Then, Ribery had a brilliant chance to give his side the lead. After some poor defensive work from Andreas Granqvist who failed to clear the danger on two occasions, the Bayern Munich man pounced on the loose ball but saw his shot from an acute angle blocked by Andreas Isaksson.
With just over ten minutes gone, Toivonen then wasted a golden opportunity to deal a blow to Blanc's men, the forward challenged Philippe Mexes in the air, and got the better of the centre-back getting himself one-on-one with the French keeper, however he lost control of the ball with a poor touch and allowed Hugo Lloris to force him wide with the eventual shot into the side netting.
The game quietened down somewhat after that, although both sides had half-chances in the following ten minutes as Benzema blazed over from a low driven Ribery cross and Larsson volleyed over from a Jonas Olsson knock-down.
France began to stamp their dominance on possession as the first-half progressed, but with 25 minutes passed they were yet to carve out any more clear chances. Adil Rami tried his luck with a long-range free-kick, but fired over, and then Jonas Olsson made a terrific block to deny Benzema a shot on goal.
Blanc's men continued to knock on the door in Kiev, but failed to find a way through and it was Sweden who had the next chance. Anders Svensson's shot found its way to Toivonen inside the six-yard-box, however Lloris slid in quickly to deny the forward a moment to react, and the offside flag was also raised.
That chance seemed to give Hamren's side some belief, after their initially promising start had faded. The Blagult managed to see a bit more of the ball in a decent spell leading up to half-time while staying solid at the back and stopping France from playing.
Minutes before the break Ribery thought he had finally dribbled free of the Swedish defence, only for Olof Mellberg to get back and slide in with a fantastic tackle, sending the ball out of play for a corner. Toivonen nearly managed to get in behind the French back-four twice more before the whistle, but strayed carelessly offside on both occasions.
The second-half nearly started disastrously for France, as substitute Christian Wilhelmsson would have been in on goal had the linesman not ruled him offside. The 32-year-old, who injected some energy into Sweden's line-up, then nearly knicked the ball from the hesitant Rami's toe but was just about muscled off it by the defender.
Five minutes in and Benzema timed his tun perfectly to beat the Swede's offside trap before cutting in and attempting a curler into the far corner, however the forward didn't get the connection he was looking for and missed the target.
Wilhelmsson continued to make a big impact on the game by controlling a long ball with a magnificent touch before beating Debuchy, he then delivers to the back post where Larsson tested Lloris with a good volley.
The French keeper saved well but was helpless to deny Ibrahimovic from scoring the opening goal. The Sunderland winger who went close moments earlier crossed from the right and the AC Milan player acrobatically volleyed into the back of the net five minutes before the hour-mark.
Sweden immediately searched for a second as Ibrahimovic nearly turned provider by holding up the ball before teeing up Wilhelmsson, but Lloris to parried his effort behind. The midfielder then forced the French keeper into a wonderful save from the resulting set-piece, the Lyon man reacting quickly to tip his volley over the bar.
With Blanc surely aware of the news that England had also taken the lead against Ukraine, and Hamren's side looking dangerous, he needed his side to respond and decided to bring Florent Malouda on for the wasteful Ben Arfa. Soon after Nasri narrowly missed the target from the edge of the box but it was more woe for the manager as Mexes picked up a yellow which sees him miss their next game.
With 20 minutes left to find the two goals that would send them top, at that stage, Benzema was denied a shot on goal thanks to brilliant tracking from Jonas Olsson before M'Vila tired his luck from outside the box, stinging the palms of Isaksson and winning a corner in the process - which France wasted.
Sweden's defence continued to hold firm at time ran-out for Les Bleus, with Mellberg denying Mexes with a brave last-ditch tackle with ten minutes remaining. Then, Jeremy Menez was thrown into the fray, and he would have made an instant contribution if it wasn't for Isaksson's foot. Another substitute, Oliver Giroud, also almost scored with his first touch from the resulting corner, but headed over the bar.
The French loss was confirmed when Sweden added a late second in injury time through Larsson who smashed a volley into an empty net after Wilhelmsson's initial effort hit the crossbar, giving the Swedes their first victory against France since 1969 and handing Blanc an unenviable quarter-final with Spain.