Having key players on the international duty and sidelined with injury, Iran came from one goal down to beat the Bosnian side before some 15,000 fans in Azadi Stadium in western Tehran.
Striker Arash Borhani failed to put Iran ahead a quarter after kickoff, sending the ball wide above the crossbar from close range.
He rued the scoring opportunity two minutes later when Elvir Bolic tapped in a low cross in the six-yard area.
The home team's midfielder Javad Nekounam outjumped his marker in the box on 18 minutes, testing the in-form Bosnian keeper Hasagic with an angled header.
Hasagic proved a world-class goalie in the 30th minute by palming away a 30-yard sizzling free-kick from veteran skipper Ali Daei.
But Daei, the world's best scorer, leveled the match six minutes before the break.
Midfielder Javad Kazemian raced down the left flank, sending a perfect cross for the unguarded Borhani near the far post and the forward left Daei alone with an empty net to find in the goalmouth.
Bolic, whose curling free-kick on 42 minutes dangerously passed the post, blamed his hoodoo when his ferocious drive in the 67th minute was bounced back by the crossbar.
The Bosnians were stunned on 72 minutes by Borhani, who grabbed the winner as he steered in a substitute Moharram Navidkia perfect cross through Hasagic's legs.
Iran will meet Bahrain in the final round World Cup qualifier in the capital city Manama on Feb 9.
Bahrain surprisingly thrashed Iran 3-0 in Manama in 2001, denying Iran a berth in the finals of 2002 Japan and South Korea World Cup as it was beaten by Ireland 2-1 on aggregate in the two-legged playoffs.
The football-crazy Iran is eagerly waiting for Feb 9 qualifying match.
Croat manager Branko Ivankovic received top Iranian coaches last week, exchanging views with them on crucial qualifying match against the bogey side Bahrain.
Asian champion Japan thrashed 10-man Syria 3-0 to claim its second warm-up win before entertaining North Korea next Wednesday.
Japan, which demolished the Kazakh side 4-0 at home last Saturday, was again playing without its European-based stars.
It opened the scoring in the 44th minute when Takayuki Suzuki headed home a cross from Brazilian-born Urawa left wing Alessandro Santos.
Addel Kader Jbeili was sent off in the 60th minute when he tripped defender Yuji Nakazawa for his second yellow card.
Japan kept the pressure on 10-man Syria and scored another goal nine minutes later with captain Tsuneyasu Miyamoto's header from a Yasuhito Endo cross.
After Syria, which failed to make the final Asian qualifying round, squandered two good chances in two minutes with less than 15 minutes remaining, Santos set up another goal.
He crossed to midfielder Mitsuo Ogasawara, who tucked the ball home from in front of goal in the 90th minute.
A shot from substitute midfielder Masashi Motoyama in injury time bounced off the bar just before the whistle.
... Payvand News - 2/3/05 ... --