Sadio Mane delivered the winning spot kick as Senegal edged Egypt 3-1 on penalties at the end of a tempestuous World Cup playoff second leg in Dakar on Tuesday to win a place at the finals in Qatar later this year.
Boulaye Dia scored in the fourth minute as Senegal won the second leg 1-0 for a 1-1 aggregate draw at the new Diamniadio Olympic Stadium, which was packed with a capacity 50,000 crowd hours before kickoff.
The nerve-filled shootout started with four misses, including from both captains - Kalidou Koulibaly and then Mohamed Salah - but Mane won the shootout, reprising his heroics in last month's Africa Cup of Nations final.
Egypt had netted a fourth-minute goal last Friday in the first leg in Cairo but that advantage was quickly eroded on Tuesday.
Idrissa Gana Gueye's free kick was cleared in the wrong direction by Egypt defender Ahmed Fattouh, straight into the path of Dia, who needed two attempts to bundle it over from close range.