Scott Parker fired West Ham a giant step closer towards Barclays Premier League safety with a blistering match-winner against Wigan.
Parker's 25-yard strike settled a roller-coaster clash at Upton Park 3-2, and that leaves the Hammers on the verge of securing their top-flight status.
West Ham's vastly superior goal difference means Hull cannot realistically overtake them and if Burnley fail to beat Liverpool on Sunday, then Gianfranco Zola's men will effectively be safe.
The hosts were a goal down after four minutes when Jonathan Spector turned Ben Watson's corner into his own net - but they hit back with strikes from Ilan and Radoslav Kovac.
The Hammers struggled to deal with Watson's corners all day and Hugo Rodallega profited from more poor defending to draw Wigan level.
But Parker, West Ham's player of the season who returned to the side after a two-match ban, settled the nerves with a 78th-minute long-range strike.
Charles N'Zogbia started for Wigan at the end of a week in which he was arrested on suspicion of using someone else to sit part of his driving test.
Wigan manager Roberto Martinez said N'Zogbia, hero of last weekend's 3-2 win over Arsenal, had made a "naive mistake" and stuck by him.
Martinez made just one change with defender Gary Caldwell back from suspension and Wigan made a lightning start.
Rodallega won a fourth minute corner and Spector deflected Watson's inswinging cross into his own net.
West Ham should have been level minutes later when Carlton Cole rounded Wigan goalkeeper Chris Kirkland but Caldwell managed to recover and block his shot on the line.
Parker and Mark Noble battled hard in the centre of midfield but the Hammers lacked penetration going forward. Wigan were able to sit deep and then attack at pace.
Wigan came inches away from a second goal when James McCarthy unleashed a powerful drive from 25-yards.
Robert Green showed every inch why he is currently England's first-choice keeper by diving full-length to his right and tipping McCarthy's shot onto the bar.
It proved to be a key moment. From almost falling 2-0 down, West Ham marched upfield and drew level.
Parker launched the Hammers' best attacking move of the half with a clever ball to Ilan from deep inside his own half.
The Brazilian striker picked out Cole, who cut into the box between Mario Melchiot and Caldwell before squaring the ball back for Ilan to score.
West Ham then had a strong penalty shout turned down. Cole tried to latch onto Noble's floated ball and seemed to be pushed to the ground by Wigan defender Titus Bramble.
Five minutes into first-half stoppage time, West Ham had the lead. Noble's curling free-kick was well saved by Kirkland but Kovac followed up and headed the rebound into an empty net from one yard.
Victor Moses, a first-half replacement for Marcelo Moreno, was leading West Ham a merry dance and he charged past Faubert into the box before shooting across the face of goal.
Ilan worked an opening for himself with a neat touch and driving run into the Wigan box. He had Cole in support but opted to go himself and was closed out by three defenders.
Watson found Mohamed Diame whose shot was blocked by Manuel Da Costa. The ball went out for a corner and once again West Ham were undone by the set piece as Wigan drew level.
Watson's delivery was flicked on by Moses and Rodallega was at the far post to turn it past Green.
West Ham's players were furious and insisted Rodallega had pushed the ball in with his hand. Referee Alan Wiley waved away the protests and gave the goal.
The hosts were hanging on now, struggling to cope with the pace of Wigan's attack as N'Zogbia cut in from the right before being chopped down by Spector, who was booked for the challenge.
Kovac hit the bar with a looping header before Parker emerged as West Ham's match-winner.
Parker collected the ball from Franco and closed in on the Wigan box before unleashing a swirling shot from 25-yards that flew past Kirkland.
Copyright (c) PA Sport 2009, All Rights Reserved.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: http://gms.to/writeforgms