Iran clinched the match against Morocco's team at the 64,000-seater St. Petersburg Stadium. In an effort to clear a last-second ball across the gate, Aziz Bouhaddouz of Morocco dave a header, and the ball went into the corner of his own net.
Morocco became the second Middle East country to yield a late winning goal on Friday, after Egypt lost 1-0 to Uruguay in Group A, due to a last-minute header from Jose Gimenez.
Morocco midfielder Amine Harit was named the best player of the Morocco-Iran match, FIFA said on its website on Friday. Harit started for Morocco and was substituted in the 82nd minute of the game.
Reigning European champion Portugal will take on Spain, the winner of the 2010 World Cup, in the second Group B match of the day in Sochi later on Friday.