Youcef Belaili celebrates scoring the opener (Photo: the Algerian Football Federation s official Twitter account)
Forward Youcef Belaili fired the visitors in front on 29 minutes, just one minute after missing a penalty.
West Ham United's in-form winger Said Benrahma doubled their lead on 40 minutes after scoring his first international goal with a shot from the edge of the area.
Sofiane Feghouli made it 2-0 two minutes later and Lyon striker Islam Slimani, who came on as a second-half substitute, completed the rout with three minutes remaining.
Burkina Faso were held to a 1-1 draw at home to Niger in the other Group A game, leaving Algeria favourites to reach the playoff.
Algeria top the group with 13 points, two ahead of Burkina Faso before both sides meet in a decisive clash in Blida on Tuesday. A draw will be enough to lift the Desert Foxes to the playoff.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)