A last-minute goal from Mattias Jonson ensured that Sweden and Denmark both qualify from Group C. Jon Dahl Tomasson twice gave Denmark the lead in an enthralling game but Jonson's strike means Italy are eliminated.
It was the result the Azzurri had dreaded and ensured that Sweden finished top courtesy of goals scored between the three sides as they all finish level on five points; Denmark scored one more than Italy.
Sweden lined up with an unfamiliar look to their midfield, as three of the four players who started against Italy missed out. SL Benfica's Anders Andersson was a surprise choice to replace the suspended Tobias Linderoth, while Jonson came in for Christian Wilhelmsson on the right. Fredrik Ljungberg continued on the left, and Kim Källström made his first start behind front two Zlatan Ibrahimović and Henrik Larsson.
Denmark made one change, with winger Jesper Grønkjær earning a starting role after impressing as a substitute in the 2-0 win over Bulgaria. Daniel Jensen kept his place in midfield alongside Thomas Gravesen, while Martin Jørgensen lined up on the left and Tomasson played a withdrawn role behind centre forward Ebbe Sand.
Heavy drizzle and a swirling wind made it difficult for both sides to settle, but it was Denmark who posed the biggest threat early on. Grønkjær was particularly prominent and his deep cross picked out Jørgensen after five minutes but the Udinese Calcio winger miscued his volley.
The slippery conditions caused Andreas Jakobsson to lose his footing on 14 minutes, allowing Tomasson to play Grønkjær into space only for the winger to slice a shot into the side-netting. Cheered on by their vocal supporters, Sweden carved their first opening seconds later as Ibrahimović cut the ball back for Larsson whose shot was blocked by Niclas Jensen.
Denmark took the lead with a moment of brilliance from Tomasson in the 27th minute. The AC Milan striker chested down a lay-off from Sand and, spotting Isaksson off his line, struck a sublime dipping volley into the top right corner from 30 metres. The goal stirred Sweden to life and they came close to equalising before half-time, with Olof Mellberg heading against the post.
Denmark sent on Kasper Bøgelund for Niclas Jensen at the break but they were still getting organised at the back when Sweden won a penalty within a minute of the restart. Larsson latched onto Mellberg's long pass and, after toeing the ball past Sørensen, was brought to ground by the goalkeeper. The striker sent Sørensen the wrong way from the spot to level matters.
Sweden, knowing a draw would guarantee them a place in the last eight, grew in confidence and began to enjoy lengthy spells of possession. One culminated with Ibrahimović feeding the ball into the path of Larsson, whose stinging low drive flashed wide from the edge of the penalty area.
Denmark struggled to find the same fluency as in the first half but received the break they needed on 66 minutes. Substitute Christian Poulsen's long-range shot deflected into the path of Tomasson who steered the ball into the bottom corner.
Denmark were now in the ascendancy, and when Ibrahimović shot straight at Sørensen on 77 minutes it looked to be the closest Sweden would come to an equaliser – before Jonson's late strike.