A second-half brace from Luis Antonio Valencia handed Wigan Athletic the win they needed to confirm their Barclays Premier League status as Aston Villa failed to keep the pressure on Everton in the battle for the UEFA Cup.
The Latics went into the match knowing results elsewhere could see them safe regardless of the score at Villa Park but Valencia's double, the first deflecting heavily off Wilfred Bouma, meant survival was assured under their own steam.
Villa, only Wigan's second away scalp of the season after Derby County, had much the better of the first 45 minutes but their lack of precision in the final third could cost them dear in the race for fifth place.
It was also a disappointing result for Villa stalwart Olof Mellberg, who was passed fit after a bout of illness to make his final appearance at the ground before his summer move to Juventus.
The hosts nearly had a stroke of fortune in the third minute when an attempted Wigan clearance ricocheted wickedly and played in Ashley Young.
But Paul Scharner was alert enough to put in a vital tackle and send the ball back to a grateful Chris Kirkland.
Gabriel Agbonlahor then battled bravely with Titus Bramble to win possession for Villa in a promising position but John Carew strayed offside before receiving Gareth Barry's pass.
Agbonlahor was set free by a long Scott Carson kick in the 11th minute, and when he went jinking down the left flank, it took a combination of Emmerson Boyce and Wilson Palacios to stop him.
messy corner
Palacios then turned aggressor, teasing a foul out of Mellberg on Villa's right-hand side, but the Swede soon made amends with a fine sliding block after 15 minutes.
Zat Knight had a good chance when he met Young's curling free-kick at the far post, but he could not hit the target.
Villa were pressing but could not find the end result, with Agbonlahor guilty of scuffing his left-footed shot minutes later.
Wigan's strategy, meanwhile, consisted largely of looking for the willing Emile Heskey with high balls, but he and strike partner Marcus Bent found little room for manoeuvre in the home defence.
A set-piece nearly provided the breakthrough.
After 33 minutes, Jason Koumas whipped in the first corner of the match, and after Bouma failed to clear, Bent fired wide from close-range.
Villa were stung into action and Agbonlahor saw his close-range header tipped onto the crossbar by Chris Kirkland in the aftermath of another messy corner.
Barry first played in the lively Agbonlahor with a perfectly-weighted pass down the right before taking the return pass and forcing Kirkland to palm the ball over the crossbar when his lofted cross sailed dangerously towards the top corner.
standing strong
But it was the away side, against the odds, who took the lead.
Having received a smart pass from Koumas and with the angle tight, Valencia took what looked to be an ambitious punt at goal. His shot ballooned off the foot of the onrushing Bouma and flew agonisingly over the stretching Carson.
The goal appeared to fortify some of the Latics players, Boyce in particular standing strong against a typically mazy surge by Young.
The momentum stayed with Steve Bruce's side, and when Heskey's neat header released Valencia, it was soon 2-0.
Two good touches took the Ecuador international clear of Nigel Reo-Coker and he beat Carson with a fierce shot at his near post.
Agbonlahor went close again, once more with a header, but Valencia will be disappointed not to have claimed his third after 70 minutes as the home defence crumbled.
By now, Heskey was leading the line and retaining possession perfectly against a defensive line further weakened by the removal of Bouma for Marlon Harewood.
Harewood nearly made his presence felt 11 minutes from time, muscling his way into space on the right of the penalty area but his firmly-struck effort screwed wide.