Match ends, Derby County 1, Wigan Athletic 2.
Substitute James McClean scored twice as Wigan came from behind to win at Championship leaders Derby.
The Rams led after an incident-packed 90 seconds just before half-time.
Seconds after on-loan Rams goalkeeper Jack Butland saved James Tavernier's penalty, John Eustace turned in Johnny Russell's free-kick from close range.
But McClean then converted Roger Espinoza's cross to level before Butland spilled Adam Forshaw's shot and McClean scrambled in a late winner.
It was Wigan's first Championship success since 30 August, while Derby - who remain top of goal difference - saw their 12-match unbeaten run come to an end and were denied a new club record of seven consecutive clean sheets.
Prior to Saturday's loss, the last time Steve McClaren's side had conceded was during a 2-2 draw with Cardiff on 20 September.
|Derby's unbeaten run ends|
|Derby fell to only their second defeat of the season - the first was a 3-2 loss at Charlton on 19 August.|
|Wigan had drawn their previous four Championship games and registered their first win since beating Birmingham 4-0 on 30 August.|
And England Under-21 captain Butland, making his home debut following his recent loan move from Stoke City, looked like extending that run with an excellent first-half display.
He saved well with his feet from visiting winger Callum McManaman, who also had an early penalty appeal waved away, while Russell and Jordon Ibe both shot wide for the hosts before Eustace was penalised for handball inside the box.
Butland rescued the Rams, diving to his right to stop Tavernier's spot-kick, and midfielder Eustace redeemed himself moments later with the opening goal.
That positive end to the first period gave Derby momentum and Simon Dawkins almost added a second shortly after coming on as a half-time substitute, while Jeff Hendrick's effort from 20 yards was palmed away by Wigan goalkeeper Scott Carson.
Wigan had rarely threatened an equaliser until Espinoza broke clear on the right and he crossed for Republic of Ireland international McClean to net his first league goal of the season.
And the winger's second ensured a first victory in nine for the Latics, although they were relieved to see a late free-kick from Chris Martin whistle wide of Carson's post.
Derby manager Steve McClaren: "We didn't get going and Wigan came with a game plan and in the end they deserved to win.
"I'm not so much angry about the result as the way we played. Credit to Wigan, they stopped us playing and we were too focused on the result rather than putting in a performance.
"It's a big lesson because you have to perform every week - you can't have an off-day and we had an off-day. We got exactly what we deserved; we've got no excuses. What hurts is not losing, it's the manner in which we did."
Wigan manager Uwe Rosler: "Before the game, nobody gave us a chance but this was the best away performance since I have been at the club.
"We had complete dedication to the game plan, demonstrating that we are not a group of individuals but that we are starting to come together and be a team.
"I am so proud as to how they reacted as a group and I think the players have answered the questions in a very impressive way. James McClean didn't sulk, he understood the reason he didn't start and he came on and finished the job off."
- 6KeoghBooked at 20mins
- 14EustaceSubstituted forBestat 80'minutes
- 19HughesSubstituted forHendrickat 45'minutes
- 44IbeSubstituted forDawkinsat 45'minutes
- 30KiernanSubstituted forKvistat 85'minutes
- 31FigueroaBooked at 74mins
- 14HuwsSubstituted forMaloneyat 70'minutes
- 29ForshawBooked at 57mins
- 15McManamanBooked at 20minsSubstituted forMcCleanat 62'minutes
- 32FortunéBooked at 90mins
- 18EspinozaBooked at 88mins
- 9Riera Magem
- Robert Madley
- Shots on Target
Second Half ends, Derby County 1, Wigan Athletic 2.
Marc-Antoine Fortuné (Wigan Athletic) is shown the yellow card for a bad foul.
Foul by Marc-Antoine Fortuné (Wigan Athletic).
Simon Dawkins (Derby County) wins a free kick in the defensive half.
Leon Barnett (Wigan Athletic) wins a free kick in the defensive half.
Foul by Richard Keogh (Derby County).
Foul by William Kvist (Wigan Athletic).
Chris Martin (Derby County) wins a free kick on the right wing.
Offside, Wigan Athletic. Adam Forshaw tries a through ball, but Marc-Antoine Fortuné is caught offside.
Corner, Wigan Athletic. Conceded by Zak Whitbread.
James Tavernier (Wigan Athletic) wins a free kick on the right wing.
Foul by Simon Dawkins (Derby County).
Corner, Wigan Athletic. Conceded by Craig Bryson.
Attempt missed. Chris Martin (Derby County) right footed shot from outside the box is close, but misses the top right corner from a direct free kick.
Roger Espinoza (Wigan Athletic) is shown the yellow card.
Foul by Maynor Figueroa (Wigan Athletic).
Leon Best (Derby County) wins a free kick in the attacking half.
Attempt missed. Marc-Antoine Fortuné (Wigan Athletic) header from the left side of the box is too high. Assisted by James Tavernier with a cross following a corner.
Corner, Wigan Athletic. Conceded by Richard Keogh.