Hosts Qatar have been eliminated in the group stage of the World Cup after Senegal condemned them to a second straight defeat.
But African champions Senegal are up and running in Group A.
Boulaye Dia broke the deadlock four minutes before half-time, slamming home to punish Boualem Khoukhi's miscued clearance.
Looking to hit back in the second period, Qatar's hopes were dashed when former Bristol City striker Famara Diedhiou rose to flick in a glorious header just three minutes after the break.
Watford's Ismaila Sarr had an early chance on his 50th cap but struck into the side-netting, while Idrissa Gueye of Everton's rasping drive went narrowly wide.
Qatar felt they should have had a first-half penalty when Akram Afif was bundled over in the box by Sarr, but referee Antonio Lahoz pointed only for a goal-kick, much to the anger of the home supporters.
Chelsea goalkeeper Edouard Mendy made stunning reflex saves to deny Almoez Ali and Ismail Mohamad, but he could do nothing about Mohammed Muntari's powerful header.
Qatar were searching for the equaliser, but Bamba Dieng stroked in to deflate the home following and leave their team bottom of the group without a point after two games played.Relive Senegal's win over Qatar
Disappointment for hosts
Qatar made history by becoming the first country from this region to host the World Cup and now have the unwanted record of becoming just the second home team to exit the competition at the group stage, after South Africa in 2010.
They needed a huge favour from Ecuador, who beat them in the opening game, to salvage any hope of remaining in the tournament but Gustavo Alfaro's side claimed a draw.
It means Qatar's first appearance at a World Cup ended in dismay with two defeats within the space of six days and have just pride to play for against the Netherlands on Tuesday.
Felix Sanchez's men, who did not have a shot on target on their World Cup debut, were backed by a raucous section of supporters behind the goal.
Others dressed in traditional attire filled the stadium at the start of their weekend, but went home disappointed as their side suffered back-to-back defeats.
Senegal's class told with their starting XI featuring 10 players who feature in Europe's top-five leagues, the exception being Sarr of Watford.
But the story could have been very different had the referee pointed to the spot for Sarr's challenge on Afif, but he left the locals outraged by failing to award a penalty.
It proved crucial as Khoukhi's scuffed clearance allowed Dia to convert the opener, and Diedhiou's unstoppable header double the advantage on 48 minutes.
Qatar, though, showed good fight to hit back via Muntari's thunderous header, which sent the partisan crowd into raptures.
But any optimism for an equaliser was killed when Dieng finished off a swift move to seal Senegal's first victory in the group.
The Qatar players were applauded by their fans at the final whistle, but some hit the deck in regret knowing their prospects of reaching the knockout stage are now over.Fifa World Cup: Groups & ScheduleWorld Cup TV Coverage guide
Player of the match
with an average of 8.45
Squad number9Player nameMuntari
Squad number17Player nameIsmaeel Mohammad
Squad number22Player nameMeshaal Barsham
Squad number2Player namePedro Miguel
Squad number3Player nameAbdelkarim Hassan
Squad number11Player nameAkram Afif
Squad number14Player nameHomam Ahmed
Squad number12Player nameBoudiaf
Squad number16Player nameKhoukhi
Squad number23Player nameAssim Madibo
Squad number10Player nameHassan Al Haydos
Squad number19Player nameAlmoez Ali
Squad number4Player nameMohammed Waad
Squad number6Player nameAbdulaziz Hatem
Squad number5Player nameTarek Salman
Squad number13Player nameNdiaye
Squad number9Player nameDia
Squad number5Player nameGueye
Squad number3Player nameKoulibaly
Squad number22Player nameDiallo
Squad number6Player nameMendy
Squad number19Player nameDiédhiou
Squad number18Player nameSarr
Squad number14Player nameJakobs
Squad number21Player nameSabaly
Squad number15Player nameDiatta
Squad number20Player nameDieng
Squad number17Player nameSarr
Squad number16Player nameMendy
Squad number4Player nameCissé
Squad number11Player nameCiss
Formation 5-3-222Barsham17MohammadBooked at 20mins2Carvalho Deus CorreiaSubstituted forJadoua Al Bayatiat 83'minutes16Khoukhi3Al Haj Fadlalla14AhmedBooked at 45minsSubstituted forOdehat 83'minutes12BoudiafSubstituted forMohammed Abdullahat 69'minutes10Al HaydosSubstituted forMuntariat 74'minutes23Al Haj MadiboBooked at 90mins19Abdulla11Afif
Substitutes1Al Sheeb4Jadoua Al Bayati5Odeh6Mohammed Abdullah7Abdelmotaal8Thaimn Qambar9Muntari13Djebril Mohamed18Mazeed20Al Hajri21Ali24Al Hadhrami25Abdulsallam26Meshaal
Formation 4-4-216Mendy21Sabaly3Koulibaly22Diallo14JakobsBooked at 52minsSubstituted forCisséat 77'minutes18SarrSubstituted forNdiayeat 74'minutes6MendySubstituted forSarrat 78'minutes5Gueye15DiattaSubstituted forCissat 64'minutesBooked at 87mins9DiaBooked at 30mins19DiédhiouSubstituted forDiengat 74'minutes
Referee:Antonio Miguel Mateu Lahoz
Match ends, Qatar 1, Senegal 3.
Second Half ends, Qatar 1, Senegal 3.
Corner, Senegal. Conceded by Mohammed Waad.
Corner, Senegal. Conceded by Boualem Khoukhi.
Attempt missed. Almoez Ali (Qatar) left footed shot from outside the box misses to the left. Assisted by Assim Madibo.
Assim Madibo (Qatar) is shown the yellow card for a bad foul.
Attempt blocked. Mohammed Muntari (Qatar) header from the centre of the box is blocked. Assisted by Akram Afif with a cross.
Attempt missed. Abdelkarim Hassan (Qatar) left footed shot from outside the box is close, but misses to the right. Assisted by Abdulaziz Hatem following a set piece situation.
Pathé Ciss (Senegal) is shown the yellow card for a bad foul.
Foul by Pathé Ciss (Senegal).
Ismaeel Mohammad (Qatar) wins a free kick in the attacking half.
Goal! Qatar 1, Senegal 3. Bamba Dieng (Senegal) right footed shot from the centre of the box to the centre of the goal. Assisted by Iliman Ndiaye.
Substitution, Qatar. Tarek Salman replaces Homam Ahmed.
Substitution, Qatar. Mohammed Waad replaces Pedro Miguel.
Attempt missed. Boulaye Dia (Senegal) header from the centre of the box misses to the left. Assisted by Pape Sarr with a cross following a set piece situation.
Youssouf Sabaly (Senegal) wins a free kick on the right wing.
Foul by Akram Afif (Qatar).
Corner, Senegal. Conceded by Mohammed Muntari.
Corner, Senegal. Conceded by Boualem Khoukhi.
Goal! Qatar 1, Senegal 2. Mohammed Muntari (Qatar) header from the centre of the box to the bottom left corner. Assisted by Ismaeel Mohammad with a cross.
Get your daily dose of Fifa World Cup reaction, debate & analysis with World Cup Daily on BBC Sounds