Jordan initially took the lead after 35 minutes when Nizar Al Rashdan scored, finding the bottom corner via a defender’s heel and goalkeeper Luca Zidane’s outstretched hand.
Algeria equalised in the 68th minute through substitute Nadhir Benobuali, who headed home Riyad Mahrez’s corner.
Amine Gouiri scored the decisive second goal for Algeria, prodding home from close range after another header from a corner, with VAR confirming the goal.
The win sets up a crucial match for Algeria against Austria to determine who finishes second in Group J behind Argentina, while Jordan’s debut hopes of reaching the last 32 were ended.