Angola's hopes of reaching the second round were shattered as Iran came from behind to share the spoils.
For 14 second-half minutes the dream was alive, with Angola one-up through Amado Flavio's header, although they still needed a favour from Portugal.
But Sohrab Bakhtiarizadeh spoiled the party by nodding in an equaliser 16 minutes from time.
Iran deserved their first point in this competition, but it was Angola who were left to rue what might have been.
They started the match knowing a 2-0 victory, coupled with a similar result for Portugal against Mexico, would see them through to play Holland or Argentina.
The noise from the horns in the stadium was deafening, rising to fever pitch when news filtered through of Portugal's two goals.
That gave Angola a sniff of the second round but it was Iran who looked more likely to score in the first half.
The game sprang into life with 24 minutes gone, when veteran striker Ali Daei had a golden opportunity to give the Iranians the lead, but somehow contrived to head over with the goal at his mercy.
That provided Angola with the wake-up call they needed and within a minute substitute Arsenio Love was through but shot tamely at Ebrahim Mirzapour.
Suddenly a match that looked dead on its feet was becoming an absorbing contest, with Iran creating the better chances.
Vahid Hashemian saw his header cleared off the line by Mendonca, while Andranik Taymoorian forced a smart stop from Joao Ricardo, with Ali Daei hovering menacingly.
Angola were also guilty of leaving their shooting boots in the dressing room, with Fabrice Akwa twice volleying over and Ebrahim Mirzapour in the Iranian goal needing to be at his best to tip over Arsenio Love's stinging drive.
The deadlock was finally broken on the hour when substitute Flavio planted a textbook header past Mirzapour to send the Angolan supporters into raptures.
Word of Mexico's penalty miss and subsequent red card had obviously reached Mendonca, who drilled two good efforts agonisingly wide in search of the second.
But the Iranians were determined to leave Germany with a point and were rewarded for their persistence in the 75th minute when Bakhtiarizadeh rose unmarked at a corner to head them level.
That seemed to knock the stuffing out of Angola and despite the continued support of their brilliant fans they seemed to accept their fate.