Ehsan Haji Safi and Reza Ghoochannejad were on target as the Asian side ensured that they will go into their clash with Nigeria with renewed confidenceIran will enter the World Cup in good spirits after a 2-0 friendly win over Trinidad and Tobago in Sao Paulo on Sunday.
Carlos Queiroz's men picked an ideal time to end a four-match winless streak as goals from Ehsan Haji Safi and Reza Ghoochannejad gave them victory.
Iran were held to goalless draws against Belarus and Iran last month before a 1-1 draw with Angola.
But they returned to winning ways thanks to an impressive performance that will give them hope ahead of their World Cup opener against Nigeria a week on Monday.
Iran started brightly and although Lester Peltier dragged a shot just wide at the other end, captain Javad Nekounam was a constant threat for the victors.
Nekounam first headed just wide in the 26th minute and - after a clash between Trinidad and Tobago goalkeeper Jan Michael Williams and Iran's Ashkan Dejagah that saw both players require treatment - he went close again.
This time Nekounam shot wide from a corner before Haji Safi gave Iran the lead in first-half stoppage time.
The Sepahan midfielder scored when, following a corner, he thrashed an effort into the top-right corner.
And Nekounam was denied by Williams two minutes into the second half as Iran looked to double their lead.
Iran won a penalty in the 50th minute after Dejagah was brought down in the area, but Nekounam could not convert the chance.
Nekounam's effort was saved by a diving Williams and the rebound grazed the upright before the goalkeeper required more treatment.
Iran did get their second goal, though, as Ghoochannejad ran on to a through-ball and fired past an advancing Williams in the 54th minute.
Karim Ansari Fard had a low shot saved with eight minutes left, but the second half, littered with substitutions, petered out after Ghoochannejad's strike.
It mattered little to Iran, though, who will be pleased to enter the Brazil showpiece on the back of a win.