The usually prolific Ronaldo was off target with a 53rd-minute penalty, awarded after a video-assisted review, as Portugal failed to build on Ricardo Quaresma's first-half stunner in the crucial Group B contest.
That miss from Ronaldo, who was perhaps fortunate not to see red for another VAR check after swinging an arm into the face of Morteza Pouraliganji, was punished when Cedric Soares was pinged for handball after referee Enrique Caceres again went to his video monitor.
Unlike Ronaldo, Ansarifard made no mistake with a powerful finish into the roof of the net to set up a grandstand finish in Saransk.
But Taremi fluffed his lines in the dying embers, firing into the side-netting from close range as Portugal held out for a crucial point.
It means the European champions are into the last 16 in second place, behind Spain – who themselves secured a dramatic 2-2 draw with Morocco – only on goals scored, while Iran settle for third with four points.
— OptaJean (@OptaJean) June 25, 2018
Photo Getty Images. Caption: Iran score a penalty against Portugal