The Republic of Ireland took the last but one place in the World Cup finals next year with a narrow defeat in Tehran.
Hamadi scored with a close range header in the final few seconds from Hamadi but it meant little.
The visitors were able to hold off the home team roared on by more than 100,000 fans at the Azadi stadium but Iran did not do enought to merit parity over two legs with the Mick McCarthy's well-organised team.
The Irish will now take a place in the December 1st draw in the Korean port city of Busan and after only one defeat over the past year they desevre their place among the elite despite a lack of true world class talent in the Irish squad.
After a quieter first half than many expected, Iran came out for the second session needing goals and they increased the tempo of their game considerably.
Shay Given produced an amazing triple save on the hour mark to defy Iran.
He punched away from Karimi and then dived at full stretch to turn a shot from Bagheri away before falling at Ali Daei's feet to turn the ball away before the striker could shot.
That sort of spirit snuffed out Iran in the first half when the home team only created one chance.
Karimi headed wide from in front of goal in the 33rd minute after Steve Staunton did not clear a cross which Ali Daei tried to head before it went through to the white-booted forward. In the 10th minute Daei had snatched at a shot and missed the near post when the easier option seemed to be to hit the far corner and Ireland were comfortable at half time.
A reverse pass from Kevin Kilbane almost put clear David Connolly after a Robbie Keane cross but Iran recovered possession in the 47th minute to go down field and claim a penalty for a foul on Karimi but he fell with no contact made.
Karimi then set up Bagheri for a great chance from in front of goal but, with either side of Given's goal to pick, the midfield play maker blasted wide.
Part of Iran's problems came from a decision to play long balls up to Daei rather than come through midfield with Bagheri's and Karimi's skills not given the chance to run at the Irish defence. Full backs Steve Staunton and Gary Breen were allowed to settle and that helped Ireland protect a 2-0 lead from the first leg.
Given saved again from Minavand in the 68th minute with a shot from the left that saw the winger hit the ball at the near post.
Fulham midfielder Steve Finan was on hand to clear in the 78th minute when Karimi dribbled into the six yard box and beyond Given but he chose to cross and to let in the defender to clear. Finan's action was typical of the good positional play used by the Irish defence to snuff out Iran's misfiring attacks.
All Content is Copyright © 2001 WorldSoccerNews.com. All rights reserved. This material is intended solely for personal use. Any other reproduction, publication or redistribution of this material without the written agreement of the copyright owner is strictly forbidden and any breach of copyright will be considered actionable. 2001