Hamren's men finally held onto a lead at the third time of asking to pick up their first points of the tournament, while defeat means Blanc's side finish second in the group
Erik Hamren's men, who already had their elimination confirmed after losing both of their first two games, frustrated the French side in the first half and through Ola Toivonen had two excellent chances to take the lead.
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.
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 scored a second through Sebastian Larsson, forcing France to qualify as group runners-up with England beating Ukraine.
Laurent 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 STREAK IS OVER
|Catch 23: Blanc to blame as France lose unbeaten streak|
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.
Toivonen then wasted a golden opportunity to deal a blow to Blanc's men, the forward challenging 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.
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.
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 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 star acrobatically volleyed into the back of the net.
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.
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 10 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.