Kevin Davies earned Bolton three priceless points against West Ham in a lively encounter at the Reebok Stadium.
They should have led by half-time as Davies saw two headers cleared off the line and El-Hadji Diouf had a goal ruled out for offside.
Davies finally found the net after the break, poking home after Jonathan Spector had impeded his own goalkeeper.
Dean Ashton's overhead shot tipped onto the bar was West Ham's best chance in a frantic second half as Bolton held on.
The win leaves Wanderers two points behind Birmingham, who drew at home to Everton, and two points ahead of Fulham who remain second bottom despite beating Reading.
Fulham's victory drags the Royals to within three points of Bolton who themselves still sit among the relegation places.
Any plans West Ham may have had for the afternoon were thrown into disarray as early as the first minute, when Anton Ferdinand limped off with a hamstring injury.
It's a four-way scrap for survival - Megson
This may explain why they seemed so out of sorts for most of the first half, as the home side dominated without managing to get on the scoreboard.
Davies came close to his 100th career goal when he got on the end of Jlloyd Samuel's cross from the left, only to see his goal-bound header cleared from under the bar by Spector.
Samuel was a constant threat on the left, weaving his way through the defence only to fire straight at Robert Green, before Davies saw another goal-bound header cleared off the line, this time by Scott Parker.
West Ham did not produce a shot worthy of note in the half, and the first meaningful statistic they contributed was when John Pantsil earned the first booking of the match for a clumsy challenge on Davies.
From the resulting free-kick by Ivan Campo, Gavin McCann flicked on to Diouf, who poked in from close range, only to be denied by the offside flag.
Curbishley unhappy with Bolton approach
Davies finally racked up his century of goals just after half-time, bundling home from close range after Green was obstructed by Spector, and this lit the fuse for a much more exciting second half.
Ashton came within inches of levelling when his stunning overhead shot was superbly tipped onto the bar Ali Al Hamsi, but the home side hit back when Kevin Nolan pounced on a dreadful defensive mix-up to put the ball in the net, only to be denied by an offside flag.
Davies's booking for a foul on Pantsil could prove costly as it earned him a suspension, and after that he put his efforts into defending Bolton's lead in the face of a fierce West Ham attack.
Bobby Zamora was replaced by Freddie Sears as the visitors threw everything into attack, but for all their industry, Parker's shot fumbled behind for a corner was a rare serious threat to the Bolton goal.
The home side dug in to defend in depth and although they remain in the bottom three and have lost Davies to suspension, the win will be a massive lift to their self-belief.
Bolton boss Gary Megson:
"The players deserve great credit not just for the way they played but in the circumstances in which they played because we didn't just battle, scrap and run and fight we actually played it on quite a few occasions.
"We had maybe three kicked off the line, a couple have gone down Robert Green's throat which could have gone either side and we've had a couple of goals disallowed which were touch and go and not a massive amount came from West Ham."
West Ham boss Alan Curbishley:
"We came here with a patched up side and then lost Anton Ferdinand through injury in the first five minutes.
"Bolton have played to their strengths and we found that difficult especially in the first 45 minutes.
"The Reebok Stadium is a very difficult place to come to.
"I do not think we got a lot of protection from the referee and I am disappointed with a few things that went on."
Bolton: Al Habsi, Steinsson, Andrew O'Brien, Cahill, Samuel, Campo, Nolan, McCann, Taylor, Davies, Diouf. Subs Not Used: Walker, Giannakopoulos, Teymourian, Cohen, Rasiak.
Goals: Davies 47.
West Ham: Green, Spector, Upson, Ferdinand (Pantsil 4), McCartney, Parker, Collison (Cole 50), Mullins, Ashton, Zamora (Sears 66), Boa Morte. Subs Not Used: Walker, Tomkins.
Ref: Peter Walton (Northamptonshire).
BBC Sport Player Rater man of the match: Robert Green 7.50 (on 90 minutes).
Please note that you can still give the players marks out of 10 on BBC Sport's Player Rater after the match has finished.
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.