New Crystal Palace manager Tony Pulis earned his first win as a rare Marouane Chamakh goal helped beat West Ham.
After the Hammers had early control with Mohamed Diame heading over, Chamakh headed in his first goal since August from Barry Bannan's cross.
Pulis praises 'unbelievable' effort
Palace could have extended their lead as Jussi Jaaskelainen made two saves to deny Jason Puncheon and Cameron Jerome.
But Pulis's side defended stoutly and the three points helped them move off the bottom of the Premier League.
The Eagles are still three points behind fourth from bottom Cardiff, yet the manner in which they held onto their lead will give Pulis hope as he bids to maintain his record of never having been relegated in 21 years of football management.
For West Ham, a disappointing evening ended in controversy as Ravel Morrison appeared to shove Palace defender Joel Ward in the face after the final whistle, earning the Hammers 20-year-old a booking.
He will miss West Ham's next game at Liverpool after collecting five yellow cards this season.
Palace's upcoming fixtures
7 December: Cardiff (home)
14 December: Chelsea (away)
21 December: Newcastle (h)
26 December: Aston Villa (a)
28 December: Manchester City (a)
The fact he did not receive a red card may be considered fortunate, but there was nothing lucky about Palace's second victory in three games, which was hard-fought, if not exactly pretty.
Chamakh, who criticised West Ham boss Sam Allardyce after playing only three games while on loan at Upton Park last season, scored his second goal of the season.
And his header came against the run of play in a first half in which West Ham had started to take control.
Palace were playing their first home game since Pulis took charge and began brightly as Jason Puncheon tested Jaaskelainen with a stinging shot.
But with Morrison back in the Hammers line-up, the visitors were better in possession than their opponents.
That led to a glut of opportunities around the half-hour mark as Kevin Nolan miscued a volley from Mark Noble's free-kick and Diame headed over from Stewart Downing's cross.
Allardyce 'frustrated and angry' at loss
Carlton Cole, who replaced Modibo Maiga in attack after scoring in the 3-0 victory over Fulham on Saturday, also created another chance for Downing, which he mis-controlled.
The Hammers have only scored three of their 12 goals this season in the first half, and they went behind in a manner which would have infuriated Allardyce, who spoke proudly about his side's defensive record before the game.
Barry Bannan's poor corner was cleared back to the Scot, and he had time to pick out the unmarked Chamakh, who glanced his header into the goal from five yards out.
Whatever Pulis said at half-time, his players came out in the second half like a team transformed.
They had three great chances to score in the space of two minutes as Jaaskelainen tipped Puncheon's shot around the post, watched Kigasho Dikgacoi head over from the resulting corner and then blocked Jerome's effort when the striker was clean through.
That period had the home supporters bouncing and they were mocking their West Ham counterparts soon after as Downing was denied a goal as the referee's assistant saw Joey O'Brien foul Chamakh after they challenged for a cross at the back post.
With Joe Cole and Maiga introduced, the visitors pressed for an equaliser with Downing's free-kick saved well by Julian Speroni.
But Palace came closest to scoring the next goal as Dikgacoi had a shot saved before substitute Jimmy Kebe fired over with the goal gaping.
West Ham manager Sam Allardyce:
"I haven't got the words for it [the goal] when everybody has a marker and the ball comes in from the corner, you still have your marker, you don't lose your marker but we did and being in the middle of the goal with a free header they're not going to miss.
"That's the most disappointing thing for me today because that's lost us the game effectively.
"On such a crucial game we should not have let that slip. A point at the end of the day wouldn't have been a bad result.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.