Goals from Deco and Cristiano Ronaldo secured Portugal's passage into the last 16 of the World Cup after victory over Iran in Frankfurt.
Barcelona playmaker Deco opened the scoring on 62 minutes with a vicious 22-yard strike past stranded Iran goalkeeper Ebrahim Mirzapour.
And Ronaldo doubled the score from the penalty spot when Luis Figo was brought down in the box on 78 minutes.
Javad Nekounam went closest for Iran, who now cannot qualify.
But despite their dominance Portugal failed to capitalise on their superiority, a factor which is likely to concern manager Luiz Felipe Scolari.
The best chance of the first half fell to Deco, who was denied when his fierce left-foot drive from eight yards was brilliantly saved by Ebrahim Mirzapour after 12 minutes.
The goalkeeper somehow managed to force the ball over the crossbar for a corner, much to the despair of the Brazilian-born star.
Wingers Luis Figo and Ronaldo began to exert their influence in midfield as both men created problems with their slick dribbling skills.
Cristiano Ronaldo converts Portugal's 78th minute penalty for the 2-0 victory
Ronaldo was a constant thorn in the Iranian defence's side
But neither man could find the incisive ball for striker Pauleta, who toiled alone up front with little success.
Ronaldo's pace saw him carve open the Iranian defence on 33 minutes, but his wicked 16-yard strike agonisingly shaved the wrong side of Mirzapour's left-hand post.
Despite continuous Portuguese pressure, the Iranians managed to cause the odd problem in their opposition's penalty area - Mehdi Mahdavikia's inswinging free-kick had goalkeeper Ricardo tentatively punching clear.
But Portugal's attacking instincts were eventually rewarded on 62 minutes when Deco collected Figo's pass five yards outside the Iranian penalty area.
The Barcelona player needed just one touch, striking a sweet first-time shot past the helpless Mirzapour, who could only watch the ball sail into the top left corner.
The goal forced Iranian coach Branko Ivankovic to make changes - and his substitution almost paid off when Rasoul Khatibi, on for striker Mehrzad Madanchi, fired just wide after Fernando Meira misjudged a long ball.
Victory was eventually secured in the 78th minute when Iran captain Yahya Golmohammadi needlessly brought down Figo in the penalty area.
Ronaldo stepped up and confidently converted from the penalty spot, firing into the top left-hand corner.
Iran should have pulled a goal back in the 92nd minute, but Javad Nekounam headed wide after rising unchallenged from a free-kick.
Ronaldo thought he had scored his second of the game in the dying seconds, but his six-yard shot was adjudged offside.
Here was another exercise in tedium as one side came to play and the other camped inside their own half and set about a damage limitation job. The knockout stages cannot really come too soon now.
As has often happened in these type of games Portugal had a presentable opening in the first few seconds as Figo waltzed down the right before squaring into Deco. The chance was there but Deco trod on the ball and the opening was lost.
This allowed Iran time to settle and they quickly showed that they had little interest in venturing beyond the halfway line. Although they consistently gave the ball away inside their own half the sheer weight of numbers back in defence meant that this did not cost them.
Figo pulled a corner back away from the crowd to give Maniche a shooting chance but his volley from the angle of the area dropped wide. Then Miguel came forward from full back and went through two challenges before scuffing a weak shot from well inside the box.
In response Iran saw Nekounam put a decent headed chance wide from a Mahdavikian free kick. This looked their only hope of success.
Although Iran had everybody back in defence this did not mean they were always marking. Figo found Deco in the box and his touch took him into acres of space just to the left of goal eight yards out. His drive was fierce but Mirzapour thrust out a strong right hand and flicked the ball over the top. A fine save.
From nowhere Madanchi was suddenly bursting through the middle but under pressure he could make no contact as Ricardo advanced. It would not be the last time the Portuguese defence would be found wanting by one long ball to a lone attacker.
The Portuguese were becoming increasingly frustrated as Ronaldo tried to show off to real purpose, Figo was increasingly shackled and Deco was peripheral. Their mood was not helped when Figo took a kung fu kick to the head from Kaebi which was somehow missed by the French referee.
Ronaldo goose stepped his way to the byeline and then chose to shoot to prove what a head the ball he can be while Ricardo Carvalho should perhaps have done better than glance another Figo corner wide.
The Iranians could not pick up again from Figo's next corner and Ronaldo had a free header six yards out. He could only get a shoulder on it, however, and Kaebi was able to bring the ball down on his chest on the line before hoofing clear.
Ronaldo produced a better attempt after cutting inside onto his left foot but his low drive only found the side netting and the half ended with Deco lobbing a super ball into Miguel inside the box. He lashed the ball towards the far post and Mirzapour mananged a touch that sent the ball lobbing just beyond the post.
Although Portugal had hardly impressed it was hard to see the Iranian rearguard action actually holding firm.
Half Time: Portugal 0 Iran 0
Apart from one promising early break which was wasted by a poor centre by Mahdavikia Iran resumed station inside their own half and set about further frustrating Portugal.
There were a few mainly hopeful efforts but little real sign of a breakthrough as the game passed the hour mark. We were basically waiting for one of Portugal's star turns to deliver something and suddenly they did to devastating effect.
Figo cut inside from the left wing a slid a square ball into Deco's path. The pint sized playmaker coiled himself into a strange body position to shoot and caught a beauty, arrowing a sweet drive right into the corner with Mirzapour a mere spectator.
It was the moment of quality we had been waiting for and Portugal had the lead.
There had been nothing to suggest Iran might muster a response but when Golmohammadi speared a long ball out of defence through the middle Meira got caught underneath it and Khatibi, just on as a sub, was clean through.
The extra touch he decided to take was unnecessary and betrayed a lack of confidence. It was also heavy and severely narrowed his angle and his eventual shot was tame, bobbling wide of the far post.
Iran did try to seek an equaliser and Zandi got down the right to send over a centre which Hashemian headed goalwards but the save was not taxing for Ricardo. The ball had been just behind the striker and although he got direction he could not combine that with pace.
Straight down the other end Figo ran down the left hand side of the area to be taken out by a ridiculous challenge by Golmohammadi. The penalty was so blatant even this referee could not fail but award it.
Ronaldo stepped forward to plant an emphatic spot kick high into the net to make the game safe. Sinking to his knees he milked the moment for all it was worth having failed miserably to pull off any of his party pieces in another frustrating display of self indulgence.
The game ended with play stretched as at no other time and the Iranian defence basically having given up.
Nekounam should have scored with a free header from a corner while Pauleta put in a weak finish when clear that Mirzapour saved with his feet. Right at the death Ronaldo tapped the ball home but was rightly given offside and an unsatisfactory game had at least produced the correct result.
Portugal will need to improve significantly to make a serious impact on the tournament, however.
Full Time: Portugal 2 Iran 0
Portugal: Ricardo 5, Miguel 6, Carvalho 5, Meira 4, Valente 5, Costinha 4, Maniche 5 (Petit 6), Deco 7 (Tiago 3), Figo 7, Ronaldo 5, Pauleta 3.
Iran: Mirzapour 8, Kaebi 7, Golmohammadi 4, Razaei 4, Nosrati 3, Mahdavikia 6, Teymourian 3, Nekounam 3, Madanchi 5 (Khatibi 2), Karimi 3 (Zandi 5), Hashemian 2.
Referee: E.Poulat (France)
Started by not booking two Portugal players for bad fouls and then proceded to whip cards out apparently at random.
When Kaebi launched a full length kick into Figo's face, however, he again saw nothing amiss. Bizarre.
Basically he was crap.
Deco's strike. Matador style, matador precision. Kill that bull, Deco.
The referee and Ronaldo. I can't believe Ronaldo feels capable of wasting so many good opportunities with his showboating nonsense when he has a man like Figo alongside him setting him such an example of how and when to use the tricks and when to keep it simple.
Kaebi's airbourne assault on Figo which left him with the mother of all shaving wounds. Mark Dennis would have been proud of it.