Artem Dzyuba sealed victory for Russia in their second Group A, as the host nation all but qualified with a 3-1 win against Egypt.
The host nation will qualify on Wednesday providing Saudi Arabia fail to beat Uruguay.
A goalless first half was played out in an incredible atmosphere at the rocking St Petersburg Stadium.
Sergey Ignashevich, Aleksandr Golovin and Denis Cheryshev had attempts for Russia during a bright start as Egypt took time to find their feet.
Trezeguet had the North African side’s best chance of the opening period, but Salah’s gradual improvement will have heartened them. The Liverpool star sent a reaction shot just wide as the break approached.
But within two minutes of the restart the Egyptian side’s hard work was undone by a cruel moment.
A poor punch by goalkeeper Mohamed El-Shenawy saw Roman Zobnin try his luck from distance, with captain Ahmed Fathy inadvertently turning the ball into his own goal while attempting to clear.
Cheryshev fired home to doubled the hosts’ lead just before the hour after some neat team play.
Salah was blocked by Mario Fernandes as Egypt looked to respond, only for Russia to go further ahead in the 62nd minute.
Artem Dzyuba impressively brought down a ball up to him and continued to hit a low shot past El-Shenawy to surely end this as a contest.
But the video assistant referee helped provide a lifeline for Egypt in the 73rd minute.
Salah was initially adjudged to have been taken down outside the box, but the VAR corrected the decision and the Liverpool forward smashed home from the spot.
The teams play their final group games on Monday, with Russia facing Uruguay and Egypt against Saudi Arabia.