Bright start
After a bright start from Senegal, the lively Qatar fans gathered behind Edouard Mendy's goal were furious in the 34th minute, when Akram Afif was bundled over by Ismaila Sarr, but referee Antonio Mateu Lahoz waved away the seemingly valid penalty appeals.
Yet just as they had grown into the game, Qatar were made to pay for Boualem Khoukhi's calamitous error, with his failed clearance falling to Dia, who made no mistake with a composed finish.
Further blow
Qatar's hopes were dealt a further blow three minutes into the second half - Diedhiou turning in Ismail Jakobs' inswinging corner.
Senegal had Mendy to thank for two excellent stops as Qatar searched for a goal back, the Chelsea goalkeeper brilliantly denying Almoez Ali and Ismaeel Mohammad.
Muntari's header
Muntari's superb header four minutes after coming on set up a grandstand finish, yet Dieng swept home to strike the decisive blow and leave Qatar on the brink.
Qatar next take on the Netherlands in their final group game on November 29 at the Al Bayt Stadium, where they had lost the tournament opener to Ecuador.
Advantage Senegal
Senegal have three points from their two games and meet Ecuador in a final pool clash at the Khalifa International stadium, the same day, when the final-round matches have simultaneous kick-offs..
As of now, Qatar, who are yet to open their account, will be out of the tournament if Netherlands beat Ecuador or that match even ends in a draw.
Consolation goal
At the Al Thumama Stadium, a howler from Khoukhi allowed Dia to net the opener four minutes before half-time when the defender got the ball caught under his feet as he tried to clear before Diedhiou headed in a second and Dieng made sure of the win late on.
Qatar scored their first-ever World Cup goal with 12 minutes of ordinary time remaining as Ghana-born striker Muntari headed in Ismail Mohamad's cross, but the rare moment of celebration for the home supporters proved only a consolation as they are all but out of the competition.