Hammers' first league victory at Maine Road since 1982, on their last ever visit to the old ground before City move to the Commonwealth Stadium, sees the gap between ourselves and Bolton Wanderers close to two points. Leeds United, who play at Arsenal next week, are three points ahead of West Ham with two matches remaining.
The Great Escape is still possible after just one defeat in their last nine Premniership games. In fact, a home win against Chelsea next Saturday would lift Trevor Brooking's side out of the bottom three, at least until Bolton's visit to Southampton that evening.
No, the claret and blue bubble hasn't burst yet, thanks to a resilient performance of which Glenn Roeder would have been proud.
Caretaker manager Brooking, who has never been so animated during a football match as he 'kicked' every ball from the sidelines, remained faithful to Roeder's favoured 4-4-2 formation and named an unchanged side from the one that started the East Monday win over Middlesbrough.
This open, end-to-end thriller produced plenty of chances for both teams. Nicolas Anelka drifted wide to either flank to create good openings for City in an even first half in which both sides wasted excellent chances. The French striker's rasping shot in the 15th minute was spilled by David James, who made a nervy start, and Robbie Fowler looked to scramble the loose ball over the line until Rufus Brevett made a vital last-ditch clearance off the goalline.
James was almost embarrassed when he sliced a through ball, intended for Anelka, but Peter Schmeichel also had his hairy moments at the opposite end. After typically making himself 'big' early on to deny Jermain Defoe's lob on the edge of his own area, the Dane almost gifted Les Ferdinand an open goal five minutes before the interval. His attempted clearance rebounded back off Ferdinand's chest but, with the goal gaping, he couldn't get the better of a tight angle and screwed his left foot shot agonisingly into the sidenetting.
It was the second near miss for Ferdi in a minute, having just seen his far-post header saved by Schmeichel after a fine, deep cross from Glen Johnson.
Brooking underlined the need for goals by bringing on Fredi Kanoute for Edouard Cisse at the start of the second half but he had formed a three-pronged strikeforce with Defoe and Ferdinand for only four minutes when the latter suffered a bad leg injury in a collision with Schmeichel, left the field on a stretcher and had to be replaced by Don Hutchison as the formation reverted back to 4-4-2. Les went to hospital for an x-ray that will hopefully confirm that his leg has not been broken.
His loss was a big blow but Hammers remained solid, with Repka seeing off Fowler, who was substituted early, while full-backs Johnson and Brevett were both impressive throughout.
James also looked more assured as the second half progressed, showing great alertness to dive at the feet of Anelka, who had got the wrong side of Ian Pearce. Sommeil volleyed wide after arriving unmarked at the far post but play switched quickly to the other end, where Defoe came very close to giving Hammers the lead.
Lurking in the danger area just three yards out, the young striker hooked a shot over his left shoulder but Niclas Jensen rescued City with a headed clearance off the line with Schmeichel beaten.
But there were still 17 minutes remaining and Hammers continued to go forward whenever possible. Defoe caused City problems throughout and he won the free-kick, cleverly and quickly taken by Hutchison, that led to the corner from which Hammers scored.
Defoe took the corner short to Joe Cole, who clipped a cross from the left that found Hutchison unmarked on the City six-yard box. His prodded effort brought a fine close-range save from the big Dane but Hutch knocked the rebound against the base of the post and, for once enjoying a bit of luck, the ball rolled invitingly across the goalline for the waiting Kanoute to nudge into the empty net - much to the delight of the vociferous Hammers fans behind that goal.
Brooking, coaches Paul Goddard (who struck our last league winner at Maine Road 21 years ago) and Roger Cross and the fans had to endure six minutes of added time, two wasted chances by Belmadi and an ankle injury that forced Pearce off, before referee Rob Styles ended an exhausting afternoon in the Manchester sunshine.
Trevor Brooking told Sky TV afterwards: "Management? It's totally different, to put it in a nutshell. It was important that we had a reaction today. We've had chances in recent games and been unlucky, so you do wonder if you're going to score. But it was a game of chances and you always felt someone was going to win the game.
''In our position, a point wasn't enough, though, so you'd rather lose the game going for it. It was a terrific performance. Upton Park will be heaving next Saturday for the visit of Chelsea.
''Glenn's wife, Faith, sent us a good luck message and after three or four days in a stable condition, the indications are that Glenn is making a little progress. Hopefully one or two of the boys will get along to the hospital to see him this week.
''This win gives us a little bit of hope and the two teams above us, Bolton and Leeds, will be looking over their shoulders.''
By Tony McDonald
Minute-by-minute:
2 - City midfielder Barton has the first shot of the match, a driven, low effort from 25 yards out that James gathers comfortably.
5 - After Cole is fouled by Dunne some 25 yards out, Defoe steps up to take the free-kick, but fires his effort straight at Schmeichel.
9 - An excellent chance for Hammers, as Ferdinand's flick-on releases Defoe, who attempts to lob the advancing Schmeichel from the edge of the area, but sees the big Dane leap high to palm the effort down and collect the loose ball.
15 - A close call at the other end, as Anelka cuts in from the left and fires in a dangerous cross-shot that James catches but then spills at the feet of Fowler, who seems set to bundle the ball over the line only for Brevett to get across and clear the danger.
20 - James slips up again, this time completely missing his kick when it would have been easier to allow the ball to run into his area so that he could collect it comfortably. Anelka gains possession on the left and feeds Fowler, whose shot is blocked by Repka to spare the keeper's blushes.
22 - Anelka collects on the left again and this time squares the ball to Wright-Phillips, who sends a blistering right-foot shot just over the bar.
24 - Wright-Phillips goes close again, advancing from the halfway line to shrug off the challenge of Johnson and fire in a low shot that has James stretching to gather.
27 - After seeing his first cross cleared, Cole is given another chance on the left and this time finds Lomas, whose glancing header drops wide of the post.
30 - Anelka continues to cause problems and tries his luck on the right this time, skipping past Brevett and crossing low to the near post, where Fowler diverts the ball wide.
31 - Hammers waste a glorious chance to open the scoring, as Lomas' cross is only cleared to the edge of the area, where Cisse is on hand to nod the ball back into the danger area. Ferdinand is in the clear just six yards out, but somehow manages to blast the ball high over the bar.
39 - A long ball releases Anelka, who cuts in from the left and looks set to score, but Johnson recovers superbly to get in a tackle that puts the striker off and forces a goal-kick.
40 - Johnson turns from defender to attacker to send in a fantastic cross to the far post that is met by the powerful head of Ferdinand, but Schmeichel is equal to the effort.
41 - Ferdinand must be beginning to wonder if it is one of those days. Chasing down a back-pass, the veteran striker blocks Schmeichel's clearance and only has to roll the ball into an empty net, but gets his angles wrong and only manages to find the side-netting.
42 - A deep City corner from the right reaches Jensen, whose half-volley from 18 yards out is well held by James.
Added time: 1 minute.
Half-time: Manchester City 0 West Ham United 0.
Second Half:
46 - Substitution for West Ham, Kanoute replaces Cisse.
47 - Wright-Phillips picks up a loose ball and fires in a fierce shot that takes a deflection off Pearce and flies just wide for a corner.
49 - Defoe's hooked pass finds Ferdinand in the box, but the veteran striker has to wait for the ball to drop and Dunne gets back to clear the danger.
50 - A neat through-ball releases Ferdinand, who challenges Schmeichel in a 50-50 for possession. The linesman's flag signals an offside decision, but worse is to follow as the Hammers striker lies stricken in the penalty area, having suffered what appears to be a serious injury. A four-minute delay follows before he is stretchered off with a splint on his right leg.
54 - Substitution for West Ham, Hutchison replaces Ferdinand.
56 - Wright-Phillips again bursts clear on the left, but again Johnson shows superb pace and timing to recover and deny his opponent with a sliding tackle.
67 - Foe's clever pass releases Anelka, who attempts to round James in the area, but the Hammers keeper manages to get his hand to the ball and push it wide for a corner.
71 - Double substitution for Manchester City, Macken replaces Fowler and Belmadi replaces Bernarbia.
74 - Hammers go close again, as Brevett's corner from the right is flicked on to Defoe, who, six yards out, hooks goalwards but sees Jensen head off the line. Cole collects the clearance and finds Defoe again, but the striker takes too long and his shot is blocked.
76 - Sommeil booked for foul on Defoe.
81 - GOAL! Hammers finally make the all-important breakthrough with a goal that could be crucial to our future. Defoe's quickly-taken corner finds Cole, whose cross is flicked on to Hutchison. He hits the post from three yards out, but the ball rebounds to Kanoute, who gratefully tucks home. Manchester City 0 West Ham United 1.
84 - Substitution for West Ham, Dailly replaces Pearce.
87 - Defoe booked for kicking the ball away.
87 - Substitution for Manchester City, Goater replaces Jensen.
Added time: 6 minutes.
Full-time: Manchester City 0 West Ham United 1.