Portsmouth's hopes of Premiership survival were lifted by a crushing win against an under-strength West Ham.
Pedro Mendes celebrates his wonder goal at West Ham
Lomana LuaLua scored from close-range to put Pompey in front after 18 minutes and Sean Davis quickly added a second.
Pedro Mendes produced a brilliant strike from 25 yards to make it three two minutes before the break.
Teddy Sheringham pulled one back after 69 minutes, but Svetoslav Todorov wrapped up the win before Yossi Benayoun got the second for West Ham.
West Ham boss Alan Pardew rested six players ahead of the FA Cup quarter-final against Manchester City - and Pompey accepted the invitation to take advantage of the weakened side.
Hammers' keeper Jimmy Walker was making his first appearance since injuring his knee against Preston in last season's play-off win - but he was not at fault as Harry Redknapp's side ran in three first-half goals.
Walker had already saved well from Gary O'Neil before LuaLua put Pompey ahead after 18 minutes.
Matthew Taylor's low cross travelled to the far post, where LuaLua slammed home from close range.
And Davis added a second seven minutes later when West Ham's defence failed to deal with Brian Priske's cross, leaving the midfield man to control and bury a finish high past Walker.
Sheringham led the West Ham response, curling a free-kick just wide and then seeing a powerful shot blocked by Dean Kiely.
But Pompey surged further ahead three minutes before half-time with a magnificent strike from Mendes.
Andres D'Alessandro set up the Portuguese midfield man 25 yards out and he sent a rising drive high past Walker.
West Ham sent on Marlon Harewood at the break, but it was Pompey who should have added a fourth after 48 minutes when Benjani was sent clear but screwed an awful finish hopelessly wide.
Harewood almost threw the Hammers a lifeline nine minutes later with an angled shot that bounced to safety off the bar.
But Sheringham did pull one back after 69 minutes, turning in the rebound after Paul Konchesky had hit the post.
Any hopes of a West Ham revival were snuffed out with 13 minutes left, LuaLua escaping from Konchesky and crossing low for Todorov to turn in.
Benayoun turned in a second for the Hammers with virtually the last kick of the game, but nothing could dampen the Portsmouth celebrations.
West Ham manager Alan Pardew:
"I'm not making any excuses for that performance. It's not good enough and I said that to the players afterwards.
"I kept the back four intact but that was our worst unit. One or two maybe had their eye on Monday but you just cannot do that at this level. I am bitterly disappointed about some of the performances.
"Quite frankly, I will take no pleasure if we win on Monday night after that. Our focus wasn't right.
"The only defence I can offer is that we have got a lot of young guys and they probably haven't been in this position before. Being just 5% not at the races and you get a performance like that.
"For the fans who turned up and paid good money we let them down."
Portsmouth manager Harry Redknapp:
"We needed that result. It was a good time to play them, let's not kid ourselves, but we still had to perform ourselves and we did that.
"We scored goals when, up until last week, we had only scored more than one goal in one game all season.
"It's scandalous the way West Ham have had to play extra time on Wednesday night, today and then go and play in the FA Cup at Manchester City on Monday.
"Whoever heard of such an important competition being played on a Monday, Tuesday, Wednesday and Thursday? Where has tradition gone?
"These fans have got to schlep up to Manchester on a Monday night. It should be on a Saturday so they can enjoy being in the quarter-finals of the FA Cup."
West Ham: Walker, Scaloni, Ferdinand (Fletcher 71), Gabbidon, Konchesky, Katan (Harewood 45), Reo-Coker, Dailly, Clarke (Benayoun 45), Zamora, Sheringham.
Subs Not Used: Bywater, Ashton.
Goals: Sheringham 69, Benayoun 90.
Portsmouth: Kiely, Priske, Primus, O'Brien, Taylor, D'Alessandro, Pedro Mendes, Davis, O'Neil, Mwaruwari (Todorov 57), LuaLua.
Subs Not Used: Ashdown, Karadas, Pamarot, Routledge.
Booked: Pedro Mendes.
Goals: LuaLua 19, Davis 25, Pedro Mendes 42, Todorov 77.
Ref: A Wiley (Staffordshire).