Portsmouth substitute Danny Webber notched his first Premier League goal for the club to keep Avram Grant's side in touch with their relegation rivals.
The Hammers held basement team Pompey 1-1 at Fratton Park, with skipper Matthew Upson giving the visitors the lead after 52 minutes.
But Webber's 75th-minute goal just two minutes after replacing Frederic Piquionne kept his side's hopes of top flight survival alive.
Portsmouth went into the clash without Papa Bouba Diop and Michael Brown, who limped out of last Saturday's FA Cup win over Sunderland with hamstring and back injuries respectively.
Right-back Steve Finnan returned from a groin injury, while goalkeeper David James sat out and reportedly remains on the brink of joining Stoke.
West Ham striker Carlton Cole started on the bench as he returned from a knee injury.
Pompey had the best of the opening exchanges with former Tottenham midfielder Kevin-Prince Boateng's trickery ensuring his side the lion's share of possession.
Striker Piquionne came within inches of scoring after 19 minutes, when John Utaka fed Hermann Hreidarsson, who scuffed the ball across the face of goal.
But the number nine failed to connect and the ball squirmed out.
The game exploded into life after 20 minutes and Asmir Begovic needed to be at his best to keep Pompey on level terms, when Frank Nouble stormed through on goal.
The Serb flew to his left to save the Hammers hitman's effort and diverted Valon Behrami's follow-up wide.
Pompey charged straight down the other end and Green needed to be at full stretch to turn a drive from Utaka wide seconds later.
Boateng's corner found Frenchman Younes Kaboul, whose volley was scrambled off the Hammers line.
The pendulum then swung back in West Ham's favour and Nouble slotted Jack Collison through on goal, but Begovic turned his shot across goal wide.
Piquionne nearly handed Pompey the lead after the break, when he flicked Kaboul's long ball forward towards goal.
But he failed to get sufficient purchase on the ball to knock it past Rob Green.
Hammers quickly went down the other end of the field and skipper Upson gave the East Londoners the lead after 52 minutes.
Pompey cleared an Alessandro Diamanti corner from the right, but the Italian curled the ball back to the far post.
Upson leapt high and diverted the ball past Begovic with his chest to send the West Ham fans behind the goal wild.
Pompey defender Mark Wilson had a golden opportunity to level from an Angelos Basinas corner after 61 minutes.
But the young defender was unable to hit the target with a free header from four yards out.
Boateng was dejected after 70 minutes, when Utaka's low cross from the right found him unmarked on the left side of the box and he dragged his effort into the side netting.
Upson had an opportunity to bag his second moments later, but his header from Mark Noble's cross was wide.
Pompey boss Avram Grant then introduced striker Webber for the final 17 minutes, and the ex-Manchester United man made an almost instant impact.
Boateng headed the ball down for Utaka, who slotted Webber in beautifully to coolly pass the ball under Green and net his first Premier League goal for Portsmouth.
Webber nearly doubled his tally after 81 minutes, when he flicked Utaka's cross from the left just over the bar.
But the Hammers held on for a point which ensures Pompey remain in deep trouble at the bottom of the table.