Rafael Benitez must have felt his Chelsea side had turned the corner after an impressive opening 45 minutes against West Ham in which they completely dominated.
Juan Mata scored the opening goal of his tenure on 13 minutes and there could have been more had it not been for a combination of excellent goalkeeping, poor decision making and wayward finishing.
But the Hammers were transformed after the interval, with the introduction of midfield powerhouse Mohamed Diame totally changing the momentum, with the Blues forced onto the back foot and left to limp back across London with their tails between their legs.
West Ham were hit with a major blow before the clash with Andy Carroll ruled out by a knee injury that is expected to keep him out for between six to eight weeks, with Carlton Cole brought in to start against his former club. Sam Allardyce also included Mark Noble following his recent suspension and Gary O'Neil was also drafted into the starting XI.
Benitez rang the changes again as he dropped Oscar to the bench and recalled Mata and Victor Moses following the drab 0-0 draw with Fulham at Stamford Bridge in midweek. Centre-back Gary Cahill also made his first start under interim manager Benitez, with David Luiz serving a one-match ban after picking up five bookings this season.
The Hammers started the game with a 4-2-3-1 formation with Noble and James Tomkins as the defensive midfield duo, but the hosts struggled badly before the interval and forced Allardyce into a double switch at the break. The introduction of Diame and Matt Taylor swung the game in West Ham's favour with the France-born midfielder the catalyst for the home side's recovery.
Chelsea also began the day with the 4-2-3-1 line-up they have favoured under both former boss Roberto Di Matteo and now Benitez. Fernando Torres remains the focal point in attack despite his continued struggles, with Mata, Moses and Eden Hazard - who had a very quiet afternoon - tasked with creating opportunities. All looked to be going to plan until the break.
Allardyce had seen his side overrun before the break and needed to take action at the interval. He withdrew Tomkins and O'Neil and thrust Diame and Matt Taylor into the fray. The impact was immediate, with West Ham pressing and pressuring Chelsea and getting their rewards. Modibo Maiga came on for Carlton Cole moments after West Ham took the lead and he helped himself to the third.
Neither of Benitez's substitutions produced the desired effect. Belgium international Hazard had rarely threatened before his number came up, with Oscar joining the fray in the 73rd minute, but the Brazilian could not impose himself on the contest. Moses' withdrawal sparked bemusement from some members of the travelling fans as Marko Marin replaced him in the 78th minute with the score at 1-1.
Martin Atkinson was inconsistent with many of his decisions and managed to infuriate both sets of players and supporters. The official penalised James Collins for climbing on Branislav Ivanovic seconds before Kevin Nolan found the net in the first half but then saw nothing wrong with Cole clambering all over the same player prior to his leveller. Atkinson also ignored Chelsea appeals for a penalty in the 71st minute when Moses went down on the edge of the box following Taylor's challenge.
Diame may have only been on the pitch for 45 minutes but he was named man of the match by our reporter Jack Woodfield. Allardyce turned to the midfielder for more bite, drive and direction and received all three and more. Chelsea's first-half threat was nullified and the former Wigan midfielder capped his display with a goal which set the Hammers on course for victory.
Mata was running the show for Chelsea in the first half having been restored to the starting line-up after being rested against Fulham in midweek. He opened the scoring and was at the heart of all Chelsea's good work with the Blues unlucky to be only 1-0 up at the break. He struck the woodwork with an excellent free kick after the interval, but was subdued by the introduction of Diame.
Victory over Chelsea was just the fillip West Ham required after a three-game winless run and the news of Carroll's injury which will keep him out until next year. With Liverpool, West Brom, Everton and Arsenal next on the agenda, Allardyce will have been delighted to see his side claim three crucial points amid a testing run of top-flight fixtures.
Quite where Benitez and Chelsea go from here is anyone's guess. The former Liverpool boss has found himself berated by his own supporters, has claimed just two points from his first three games in charge with only one goal scored in 270 minutes of football. They now face a make-or-break week in the UEFA Champions League where a group stage exit would only add to the Spaniard's woes.