It was a bitter disappointment for the Egyptian side, however, with Liverpool striker Salah unable to prevent three consecutive defeats for his country.
Saudi Arabia's Salem Aldawsari flips to celebrate scoring his side's winning goal with the final kick of the game against Egypt.
It was an enthralling first half between the two teams from Group A who have already been eliminated.
Stopper El-Hadary was born in Damietta on January 15, 1973, and now plays his football in Saudi Arabia for the side Al-Taawoun - he made 22 appearances last season and even scored a goal, a penalty.
It was Egypt who broke the deadlock on 21 minutes as Salah latched onto a long ball before lobbing the on-rushing Yasser Al Mosailem to nestle the ball in the back of the net. He died on Monday after Egypt lost 2-1 against Saudi Arabia.
Football star Mo Salah scored first within the first 25 minutes, marking Egypt's fourth ever goal at the World Cup.
Saudi driving ban ends as women's rights activists remain jailed
Saudi Arabia is among the most conservative countries in the world and women have traditionally had much fewer rights than men. Saudia Arabia's transformation, including allowing women greater freedoms and equality, may be essential to its economy.
Trump orders halt to family separations
On Tuesday, the Department of Homeland Security said 2,342 children have been separated from their parents since last month. Trump's said the order does not alter the "zero tolerance" policy itself that the administration put in place in April.
Nigeria vs Iceland : Musa brace restores hope for Eagles
Iceland had a chance to get one back but Gylfi Sigurdsson sent a penalty kick way over the Nigeria bar in the 83rd minute. Nigeria sweep aside Iceland to set up showdown with Argentina after Ahmed Musa strikes twice against Iceland .
El Hadaray did not finish victorious, however, as Salman Alfaraj - with another penalty - levelled Mohamed Salah's opener and Salem Aldawsari struck an injury-time victor.
Saudi Arabia finished third in Group A with three points while Egypt was last.
Almuwallad had earlier missed a chance to equalise when El Hadary saved his penalty.
Brilliant as the save was, El-Hadary wasn't able to duplicate it a few moments later when Salman Alfaraj got a second penalty shot in stoppage time.
Cavani sealed the win with a tap in from close range for his first World Cup goal.