Egypt needed penalties to beat Australia and advance to the Round of 16 at the FIFA World Cup, but pulled off a genius move when the Socceroos attempted to pull a last-minute tactic.

Mohamed Salah and Egypt celebrated their first-ever World Cup knockout game by beating Australia on penalties following a 1-1 draw. Although Australia's head coach, Tony Popovic, decided to switch his goalkeeper for the shootout, Egypt scored all four with ease.

Egypt may have faced complications with the Dallas PD ahead of Friday's game, but they were jubilant after securing a Round of 16 tie against Argentina or Cape Verde. However, an instinctive move may have helped them there.

• World Cup team has green light to use viagra ahead of next game

• World Cup team head coach taking refuge in US as country's president demands investigation

Australia has trusted 22-year-old goalkeeper Patrick Beach at the World Cup, with veteran option Mathew Ryan as the backup on the bench. Beach made eight saves during a 2-0 win over Turkey in the group opener, and the Melbourne City goalkeeper has impressed.

However, as extra time neared its end and penalties approached, Popovic decided to bring on Ryan for the shootout. The veteran has saved 12 penalties in his career and has recently been playing in La Liga.

The move posed a threat, as there is a history at the World Cup of substitute goalkeepers winning shootouts, including Tim Krul for the Netherlands. That wasn't the case against Egypt, which quickly countered the tactical change.

Patrick Beach was replaced by Mathew Ryan in the 119th minute

The Egyptian players quickly began watching the recent penalties that Ryan has faced as a Levante goalkeeper in La Liga. One of those penalties was against Kylian Mbappe, who chipped it down the middle and scored.

Not only was Egypt perfect from the spot, but Salah drew inspiration from Mbappe's panenka and converted down the middle. Salah was seen smiling at Ryan as the ball hit the net.

"If somebody was going to do it, it would be me," Salah said after the game. "I am more experienced than others, and I wanted to give them confidence. I decided last minute, I had to do it."

Mohamed Salah chipped his penalty down the middle as Ryan stumbled over

The tactical approach by Australia coach Popovic didn't pay off, and two center-backs also stepped up to take spot kicks and missed. Australia played well at the World Cup and finished second behind the U.S. to advance, but blew a big opportunity.

Popovic was asked about his decision to change goalkeepers at the end of the game, and admitted that it was a planned call. "I think that was always an option for us…you've got to see how the game plays out...we still had one available, and we put Maty on," he said.

While it was heartbreaking for Australia, Egypt has extended its greatest run in World Cup history. Salah was in tears after the game and said, "It's history. I told the boys before the game that this is the biggest stage you can play on.

"Enjoy it and don't let the pressure get to you. I'm glad that we managed to win the game, bad luck for them. I'm happy that we wrote history today."