It was arguably the Hammers’ best display of the season and it put a massive dent in Liverpool’s Champions League hopes, who lie behind Chelsea in sixth place.

During a spell of intense pressure on the West Ham goal, Glen Johnson pulled one back for Liverpool with the score at 2-0. He tapped in a cross from new signing Luis Suarez , which he worked after some delightful footwork in the box. But Carlton Cole fired in a third for the home side with a handful of minutes left on the clock.

The defeat left the Reds eight points behind fourth-placed Tottenham having played a game more, while Avram Grant was able to celebrate a result that moved the Hammers level on points with fourth-bottom Wolves.

The hosts certainly did not lack for confidence in the opening moments, Thomas Hitzlsperger – making his Premier League debut for the club – unleashing an outrageous 40-yard volley that flew into the arms of Jose Reina.

A minute later, Raul Meireles looped a header wide from the fit-again Steven Gerrard’s pinpoint 50-yard ball before Martin Skrtel was booked for tripping Frederic Piquionne in full flight.

Meireles also fired straight at Robert Green, Gary O’Neil’s shot hit a Liverpool defender and Glen Johnson saw a header from a corner blocked before the game settled down.

A Hitzlsperger rocket was again too close to Reina before Parker showed the kind of precision his team-mate had been lacking to give West Ham a 22nd-minute lead.

He and Hitzlsperger played a neat one-two on the edge of the box and Parker floated a delightful finish right into the far corner with the outside of his foot.

Dirk Kuyt hit the side netting from 20 yards following a lightning Liverpool break when team-mates were arguably better placed.

The recalled Piquionne then sent a wicked ball across the six-yard box, which just evaded Ba.

Liverpool struggled to respond, Luis Suarez repeatedly coming off second best in his personal battle with the impressive James Tomkins.

Right-back Martin Kelly’s low drive was too close to Green as the interval approached, while Mark Noble curled a free-kick wide at the other end.

Liverpool suffered another blow when Kelly pulled a hamstring and was replaced by Joe Cole, Dalglish switching his formation from 5-3-2 to 4-4-2.

That was not the end of their woes, with the unmarked Ba powering home a header on the stroke of half-time from O’Neil’s cross.

Liverpool began the second half on top but nevertheless made a quick change when David Ngog came on for Meireles.

With Wolves having won 4-0 yesterday, West Ham needed another goal to climb out of the drop zone and Ba almost provided it when he drilled inches wide from 25 yards.

Tomkins, Piquionne and Ba were all close to connecting with a corner as the home side hit back.

But they had Green to thank for preserving their two-goal lead when Suarez finally beat Tomkins with a quick turn and unleashed a rising drive which the goalkeeper tipped behind.