Sadio Mané secured Senegal's place at the World Cup with a win over Egypt on penalties after Mohamed Salah was targeted by laser pointers as he stepped up to take his team's first kick in the shootout.
Mané kicked the winner from the spot for a 3-1 victory in the penalty shootout at Senegal's new Abdoulaye Wade Stadium after their playoff ended 1-1 on aggregate.
Senegal's victory was like a repeat of the African Cup of Nations final last month when Mané clinched a first major title for his country by also scoring the winning penalty in a shootout against the Egyptians.
Ghana, Morocco, Tunisia and Cameroon also qualified for Qatar and will join Senegal to make up Africa's five teams at the World Cup.
While Mané has now celebrated an African championship and a World Cup place in quick succession, there was more pain for his Liverpool teammate Salah, the Egypt captain.
After Senegal captain Kalidou Koulibaly hit the crossbar with the first penalty of the shootout, Salah blasted his attempt over the crossbar while he had green-coloured lasers shining and body, presumably by Senegalese fans trying to distract him.
The entire game was marked by those lasers being constantly shone at Egypt players. Senegal players also had the same problem in the first leg in Cairo last week.
Salah didn't get a chance to take a penalty in the African Cup final shootout as it was decided before it got to him. Going first went no better for him this time and Egypt missed three of its four penalties in Senegal.
Senegal also missed its first two but Ismaila Sarr and Bamba Dieng scored, giving Mané the chance to seal a place at the World Cup in Qatar with Senegal's fifth penalty. He looked at the referee, gave him a thumbs-up and then smashed it down the middle in front of around 50,000 fans.
The second leg had finished 1-0 for Senegal after extra time thanks to an early goal from close range by Boulaye Dia. That left it 1-1 on aggregate after Egypt's narrow first-leg victory, when Salah was key in giving his team the lead.
It's just the third time Senegal has qualified for the World Cup and the first time it has reached back-to-back tournaments after also making it to Russia in 2018. Before that, Senegal's only other appearance was in 2002, when it made a surprising run to the quarterfinals on debut.
Also Tuesday, Cameroon pulled off a stunning 2-1 victory in Algeria after extra time to end 2-2 on aggregate and advance on the away goals rule.
Cameroon, trailing 1-0 from its home leg, scored early to level it. But Ahmed Touba's header from a corner with two minutes to go in extra time appeared to have secured a dramatic qualification for Algeria.
Cameroon launched a free kick at Algeria's goal in the fourth minute of injury time at the end of extra time and Karl Toko Ekambi connected with a low volley to see Cameroon take the World Cup place.
Algeria coach Djamel Belmadi slumped to his knees and covered his face with his hands and stayed like that for minutes as officials tried to console him. It was another hard blow for Algeria after it was dumped out of the African Cup in the group stage two months ago to end the defense of its title.
Ghana earlier became the first team from Africa to qualify for this year's World Cup with a 1-1 draw in Nigeria in the second leg to advance on away goals after the first leg in Ghana ended 0-0.
Thomas Partey scored the decisive goal for Ghana in the 10th minute in Abuja. William Troost-Ekong equalized for Nigeria with a penalty in the 22nd but Nigeria couldn't use its home advantage to get a winner.
Ghana will return to the World Cup after missing out on the 2018 tournament. Angry Nigerian fans threw plastic bottles and other objects at the end and then invaded the field, forcing Ghana's players to scramble for safety down the tunnel while police let off tear gas in the stadium.
Morocco beat Congo 4-1 for a 5-2 aggregate victory. Tunisia was happy to draw 0-0 at home against Mali to get to the World Cup with a 1-0 aggregate win. It denied Mali a debut at soccer's marquee tournament. (AP)