Egypt scored a 95th-minute penalty to beat Congo 2-1 and so reach the World Cup for the first time in over a quarter of a century.
Mohamed Salah was the Egyptian hero, scoring both goals, in a win that takes them to the tournament for the first time since 1990.
Congo's equaliser four minutes from time, as Arnold Bouka thumped home, had dampened spirits in Alexandria.
But the Egyptians' World Cup hoodoo ended as Salah held his nerve late on.