Sam Allardyce had a birthday to forget as his West Ham side put on a defensive horror show to help Manchester City to their first away win of the season.
A breakdown in communications between James Tomkins and Winston Reid allowed Sergio Aguero to put City ahead, and slack marking from Ricardo Vaz Te later allowed the Argentine to head home his seventh goal of the season.
Vaz Te made amends by scoring with an acrobatic overhead kick, but David Silva struck ten minutes from time to give Manuel Pellegrini's men a 3-1 win.
The Chilean manager could be happy with his team's performance. Silva, Aguero and Alvaro Negredo were all outstanding, but their task was made much easier by the Hammers' poor defensive showing.
Allardyce, who turned 59 on Saturday, had prided himself on the fact that West Ham had only conceded five goals in their first seven games.
But Silva was afforded too much space every time he collected the ball, while Reid and Tomkins were easily outdone for pace by the excellent Aguero.
Beore kick-off, Pellegrini had admitted City's away form was a concern. And while this performance in east London was not on a par with their rip-roaring home display against Newcastle, it would be foolish to write off their title hopes, especially when their neighbours Manchester United have endured such a difficult start to the season.
Hopes were high among the home fans at kick-off. With the 3-0 win at Tottenham still fresh in their minds, rarely-heard chants of "Sam Allardyce's barmy army" rang out around Upton Park.
West Ham started with the same purpose and drive they displayed at Spurs two weeks previously.
Mohamed Diame picked the ball up from Razvan Rat before cutting inside and hitting a swirling shot that flew inches wide of Joe Hart's goal.
Hart gave the Hammers fans further reason for optimism when he mishit a clearance, but the home side failed to take advantage.
Then City started to take a grip on the game.
Reid put in a crucial tackle to deny Aguero, but the New Zealand defender switched off moments later and City's Argentina striker took full advantage.
Fernandinho played a long ball along the floor from the halfway line towards Negredo. Reid and Tomkins expected the Spaniard to collect the ball, but he sold them a dummy, leaving the ball completely. Aguero was in behind the two defenders in a flash and slotted the ball calmly past Jussi Jaaskelainen.
Aguero could have made it 2-0 two minutes later, but volleyed straight at the West Ham goalkeeper while free inside the box.
City were playing some delightful football. Silva was given far too much time on the ball and kept looking to unlock the home defence with a series of superb incisive passes.
Aguero was looking unstoppable. The striker slalomed his way through the West Ham back line and drew another save from Jaaskelainen.
West Ham were barely creating anything going forward, as Vaz Te headed weakly into Hart's arms just before half-time.
City flew up to the other end and would have doubled their lead had Jaaskelainen not pulled off a top save to deny Yaya Toure.
What Allardyce said to his team at half-time had little effect as the Hammers fell 2-0 behind after another piece of shambolic defending.
This time, Vaz Te was the offender. The Portuguese player gave Aguero two yards of free space in the box and the striker capitalised by nodding Silva's cross past Jaaskelainen.
Allardyce buried his head in his hands, but Vaz Te put himself back in favour by firing the Hammers back into the game.
Rat's cross made its way to the back post where Vaz Te, with his back to goal, leapt up and acrobatically beat Hart from eight yards.
The goal lifted the home side, but City went back on the attack with Negredo, who struck the bar on a breakneck counter.
Allardyce made two changes, with Matt Jarvis and Joey O' Brien coming on for Guy Demel, who had picked up an injury, and Vaz Te.
West Ham were vulnerable at the back as they pushed for an equaliser and City capitalised.
With ten minutes left, the visitors went on a lightning counter-attack. Toure played in Aguero, who backheeled to Silva, and he curled the ball home after giving Reid the slip.
The fans who hailed Allardyce at kick-off flooded out of Upton Park, and City relaxed, knowing the three points were in the bag.