Goals from Said Benrahma and Jarrod Bowen sealed the win West Ham United needed to secure a top-two spot in their Conference League group.
The Hammers reached the semi-finals of the Europa League in 2021/22 and this win ensured a second successive run to the latter stages of European competition.
They now only need from their final two games – against Silkeborg and FCSB – to ensure they finish top of the group and move straight into the round of 16 without a play-off.
However, some of the gloss was taken off their achievement by crowd trouble which required riot police to intervene.
The hosts took the lead in the 13th minute when Anderlecht enforcer Amadou Diawara fouled Benrahma on the edge of the box.
Aaron Cresswell had moments earlier curled a free-kick over but this time he stepped over the ball, allowing Benrahma to whip his shot right-footed over the wall and inside the near post.
After half an hour the Hammers had their second, Emerson Palmieri galloping down the left before pulling the ball back for Bowen to finish from 15 yards.
The goal made Bowen West Ham’s joint leading scorer in Europe with six, alongside Johnny Byrne and David Cross.
He should have moved out on his own with seven moments later when Cresswell cut the ball back, but the England hopeful missed his kick in front of goal.
Anderlecht, whose boisterous fans lit five flares in the way end, one of which landed near the pitch, threatened to spoil the party when Yari Verschaeren drilled narrowly wide and Sebastiano Esposito forced a fingertip save from Alphonse Areola.
But it was largely plain sailing for the hosts and Pablo Fornals, on at the break for Lucas Paqueta, should have hit a third only to see his shot blocked by Diawara on the six-yard line.
Bowen was given a rest after an hour by David Moyes with Gianluca Scamacca sent on, and the Italian almost converted a cross from Fornals while Benrahma put a header narrowly wide from Vladimir Coufal’s centre.
It should have been an ultimately comfortable night for West Ham, although the scenes in the stands were depressingly unpleasant.
A pitch invader briefly halted play before missiles were hurled between sets of rival fans including another flare which landed in the home end.
While attentions were focused on the nonsense in the crowd Anderlecht scored a consolation from the penalty spot through Esposito after a foul by Ben Johnson.
READ MORE: Premier League five-year net spend table… Liverpool just above Man City in ninth