Ibrahimovic's magic goal helped Sweden draw 1-1 with Italy, while Demark winned their encounter 2-0 to send Bulgaria home in Group C matches of the 2004 European soccer championship on Friday.
Dominating the game from the beginning, the Italian seemingly would surely win the game, and for them, the key to win the game was just time.
In the third minute, the Italians got their first chance when Christian Vieri controlled the ball and evaded Swenden's defence line to make a shot, but only say the ball was confiscated easily by Swedish goalkeeper Andreas Isaksson.
Five minutes later, Vieri got another chance when Alessandro Del Piero, nicknamed "Golden Boy" of Italy, passed the ball exactly to the head of the Inter Milan frontier, but the ball flied over the bar.
Vieri had yet another opportunity in the 33rd minute when his head met the cross of Andrea Pirlo from the left, but the attempt was again wide, this time on the outside of Isaksson's left-hand post.
It was not until the 37th minute that Italian took their first goal by Cassano, who beat the off-side trap to score a Panucci cross to put Italy into the lead.
Leading the game into the last five minutes of the second half, most Italian fans thought they were going to win their first game, but a failed clearance on a corner kick saw the ball fall to Zlatan Ibrahimovic, who shot a magic goal with the outside of his right leg to earn Sweden's hard-fighting draw aginst Italy.
Italy pushed hard toward the end, but could manage just one point to sit third in the group, needing a win over Bulgaria plus some help to advance.
In the previous game played in Braga, Bularia, who conceded seven goals against nil in their opening two matches, was sent home by Denmark after the latters won the game 2-0 to set an intriguing final group game against Sweden.
Jon Dahl Tomasson opened the score just before the break as the AC Milan striker tapped home a perfect cross from unselfish Martin Jorgensen in the 44th minute.
Jesper Gronkjaer who joined the squad late because of the death of his mother, added the second with a controlled shot, sealing the 2-0 victory over Bulgaria, who became the second team to be knocked out of the tournament after Russia.