Thomas Hitzlsperger was on target on his West Ham debut as Avram Grant's side shrugged off their relegation worries to book a place in the quarter-finals of the FA Cup with a clinical hammering of Burnley.
The German, who had been out for six months with a thigh injury, opened the scoring with a 25-yard thunderbolt before Carlton Cole scored twice in three second-half minutes to put the Hammers in the driving seat.
The second of the England forward's strikes - a beautifully-taken half volley - was followed by Winston Reid's powerful header on the hour to make it 4-0.
An error by Robert Green gave Jay Rodriguez a consolation for the Clarets, but Grant's team scored again through Freddie Sears in injury time to seal the emphatic win and set up a quarter-final clash with Stoke.
Cole was not given a chance to seal his hat-trick as he was replaced by Jonathan Spector with 15 minutes left.
Burnley stopper Grant had to be at his best to tip over Ba's fizzing 25-yard volley 10 minutes from the end.
That was the Senegalese's last contribution as he was replaced Frederic Piquionne with eight minutes remaining.
The Frenchman ballooned a 30-yard effort over the Burnley goal near the death as the Hammers looked for a fifth.
Reid then pulled off a fantastic goal-line clearance at the other end before Sears wrapped the win up with an 15-yard strike at the death.