Match ends, Wigan Athletic 2, Brighton and Hove Albion 1.
Wigan beat struggling Brighton to record a first home win since August and keep their slim hopes of Championship survival alive.
Home debutant Tim Chow put the Latics in front with a header.
Dale Stephens levelled for the visitors after the break after the hosts switched off at a corner.
With time running out and the hosts looking set to be relegated for the second time in three seasons, James Perch won it from close range.
Gary Caldwell's side are now five points off safety with two games remaining.
They must beat play-off chasers Wolves and Brentford and hope that Rotherham fail to win any of their three games if they are to avoid relegation to League One.
Caldwell was leading the side at the DW Stadium for the first time after replacing fellow Scot Malky Mackay last week.
The former Latics captain has already managed what Mackay failed to do in his 119 days in charge and win a home game.
|What a difference a year makes|
|Wigan and Brighton both reached the Championship play-offs last season. The Latics lost to eventual winners QPR while the Seagulls were knocked out by Derby.|
Their last win in front of their own fans came with a 4-0 success over Birmingham City under Uwe Rosler on 30 August.
Chow, who was given his debut by Caldwell in Tuesday's defeat at Millwall, put the Latics in front with a good header from Jermaine Pennant's cross.
The lead was nearly cancelled out just seconds later when Beram Kayal worked his way forward before forcing a fine low save from Scott Carson.
Despite that scare, Wigan finished the half firmly in control and defender Jason Pearce came close to doubling their lead with a header before James McClean was denied one-on-one by Brighton keeper David Stockdale.
Brighton, who face games against Premier League hopefuls Watford and Middlesbrough in their last two matches, could yet find themselves dragged into relegation danger as they sit just six points above 22nd-placed Millwall.
They improved after the break and levelled when Stephens was left unmarked at a corner before Kazenga LuaLua had two good chances to put them in front.
Chris Hughton's men were left to rue their missed chances as Marc Antoine Fortune fired in a low cross that was eventually converted by James Perch after poor defending.
The hosts saw it out but know that survival remains out of their hands.
Wigan boss Gary Caldwell: "All we can do is win our games, and I've said that since day one. This was a big win, because it was the first at home for so long, and to get this will be great for confidence.
"When you've not won for so long at home, the confidence perhaps isn't there to keep playing, so you try to protect what you've got. They get their goal and all credit to them for that, but we went 4-2-4 at the end and tried to be as attacking as we could. The second goal was all about desire and eagerness to get a goal, and I thought our play overall deserved that."
Brighton boss Chris Hughton: "It was a game we should never have lost. We weren't good enough in that first half, and if you're going through parts of a game when you're not at your best, you've got to remain resolute.
"We got back into the game at 1-1, and for 15 minutes it looked like if one team was going to go on and win the game, it was going to be us. We then conceded another poor goal and, at that stage, it becomes difficult because you've got to throw more men forward and it becomes even more open."
- 36KvistSubstituted forBoyceat 61'minutes
- 19CowieSubstituted forFortunéat 61'minutes
- 15PennantSubstituted forMckayat 79'minutes
- 26Al Habsi
- 33HalfordBooked at 90mins
- 22HollaBooked at 51minsSubstituted forCarayolat 86'minutes
- 14CalderonSubstituted forBestat 84'minutes
- 6StephensBooked at 38mins
- 25Lua Lua
- 12Mackail-SmithSubstituted forO'Gradyat 45'minutes
- Keith Hill
- Shots on Target
Second Half ends, Wigan Athletic 2, Brighton and Hove Albion 1.
Corner, Wigan Athletic. Conceded by Bruno.
Greg Halford (Brighton and Hove Albion) is shown the yellow card for a bad foul.
James McClean (Wigan Athletic) wins a free kick in the attacking half.
Foul by Greg Halford (Brighton and Hove Albion).
Attempt blocked. Mustapha Carayol (Brighton and Hove Albion) right footed shot from the right side of the box is blocked.
Jason Pearce (Wigan Athletic) wins a free kick in the defensive half.
Foul by Leon Best (Brighton and Hove Albion).
Delay over. They are ready to continue.
Delay in match (Wigan Athletic).
Foul by Emmerson Boyce (Wigan Athletic).
Chris O'Grady (Brighton and Hove Albion) wins a free kick in the defensive half.
Substitution, Brighton and Hove Albion. Mustapha Carayol replaces Danny Holla.
Attempt missed. Marc-Antoine Fortuné (Wigan Athletic) right footed shot from the centre of the box misses to the right. Assisted by Billy McKay.
Substitution, Brighton and Hove Albion. Leon Best replaces Íñigo Calderón.
Billy McKay (Wigan Athletic) wins a free kick on the left wing.
Foul by Beram Kayal (Brighton and Hove Albion).
Goal! Wigan Athletic 2, Brighton and Hove Albion 1. James Perch (Wigan Athletic) right footed shot from very close range to the centre of the goal.
Substitution, Wigan Athletic. Billy McKay replaces Jermaine Pennant.