The Hammers' FA Cup dreams are over for another year after Stoke City squeezed through to the semi-finals with victory in a combative contest at the Britannia Stadium.
Avram Grant's men arrived on the back of three successive home wins but could not keep that run going on a scrappy Sunday afternoon. The fourth meeting this season was the most dramatic with all three goals sparking debate. Only the woodwork denied the Hammers a replay, though, with Matthew Upson crashing a header against the bar on 86 minutes.
Robert Huth had opened the scoring for the home side with a free header on 12 minutes although the Hammers claimed Upson was blocked in the build-up. The equaliser came on the half-hour mark with Frederic Piquionne bundling in from close range as Stoke appealed for handball.
The second half was as uncompromising as the first and it was settled by an unlikely winner from Danny Higginbotham. It came from a 20-yard free-kick which the impressive Robert Green - who had saved a Matthew Etherington penalty a minute after the restart - was just unable to keep out.
On a clear day in the north-west, Stoke were at it from the first whistle, with flying wingers Etherington and Jermaine Pennant giving the Hammers rearguard plenty to think about. Grant had made just one change from last weekend's 3-0 win against the same opposition, with Demba Ba remaining in London and Victor Obinna starting in place.
Etherington should have opened the scoring with a header from point-blank range with two minutes on the clock. Ten minutes later, Stoke were in front with Green flat-footed as Huth was able to meet a huge Rory Delap throw.
It was to be the 16th minute before the first Hammers' shot with Mark Noble trying his luck from distance. Manu da Costa had a similar effort three minutes later but in truth the first 30 minutes were dominated by the Potters.
Then came a delightful ball over the top from Thomas Hitzlsperger for Piquionne to chase. He brought the ball down at the top of arm and shoulder before it was lofted over Thomas Sorensen and into the net.
However, Piquionne played no further part, being injured in the process. Stoke could have regained the lead just before the break but for Green's double save from Jon Walters and Delap. The England keeper fared even better after Etherington went over under Parker's presence 15 seconds into the second half to win a penalty. Green stood firm to save his old team-mate's spot-kick.
Stoke's winner came just after the hour mark when the referee adjudged Carlton Cole to have handled in the wall when defending a free-kick. The ball was moved ten yards closer to the edge of the area and Higginbotham was able to smash in through a gap in the wall vacated when Huth collided with Hitzlsperger. The visitors refused to give in with several efforts raining in on Sorensen's goal including a fierce Obinna shot and substitute Robbie Keane's flick - but Stoke equally had their moments.
When Upson's chance came and went, so went the Hammers' hopes of Wembley for another season. Grant's men will instead turn their attention to the final nine games of their Premier League survival fight, starting with Saturday lunchtime's London derby at Tottenham Hotspur.