Saudi Arabia, whose last World Cup win came 12 games and 24 years ago, worked their way back into the contest and were presented with a golden chance to level when referee Wilmar Roldan awarded them a penalty after penalising Ahmed Fathy for handball.
Al Faraj took over the spot-kick duties and fired his effort to the right of El Hadary in the sixth minute of first-half stoppage time.
At 45 years and 161 days, El-Hadary is making his 153rd appearance for Egypt, and he's the oldest player to ever play in the World Cup.
Saudi Arabia score in the fifth minute of added-on time to record a 2-1 victory over Egypt in Group A to end their World Cup campaign with three points.
Saudi Arabia were thumped 5-0 by Russian Federation and then lost 1-0 to an unconvincing Uruguay.
Meanwhile, Uruguay and Russian Federation are the two teams that progressed from Group A after the south American finished top of the table with nine points, as the hosts ended up second with six points.
Jamaican father of slain rapper XXXTentacion speaks out
A public viewing for fans of XXXTentacion will be held on Wednesday (June 27) at BB&T Center in Sunrise , Fla., from 12PM to 6PM. However, the Sheriff's Office stated that the investigation is continuing as detectives "are seeking additional suspects".
The Liverpool forward opened the scoring with a expert finish after 22 minutes, controlling a ball forward before hoisting it over the onrushing goalkeeper.
Saudi Arabia fielded Yasser Al-Mosailem as the goalkeeper, meaning that the kingdom's three keepers will each have played one game in Russian Federation.
With the final kick of the game, Saudi Arabia snatched the winning goal, with Salem firing a low effort past El-Hadary from six-yards out.
On current form, Salah is one of the best players in the world, and the World Cup will be a poorer place without the brilliant Egyptian in the knockout stages.
For Egypt, Mohammed Salah's injury that he received in the Champions League final has severely hampered his performance and has had a negative effect on the team. The Pharaohs are taking on Saudi Arabia in a clash that means nothing in terms of progression but has a heavy dose of pride on the line.
This time, it was Al-Faraj who took on the responsibility and made no mistake in sending El Hadary the wrong way for the equaliser.