A brilliant strike by captain Alan Browne in the seventh minute of stoppage time gave Preston North End a Boxing Day win at Pride Park.
The Lilywhites' record of one win in their last 20 league games against the Rams was ended by the No.8 against the ten-man Rams, who had Martyn Waghorn sent off after 20 minutes for a foul on the match-winner.
Both sides went into the game unchanged from their pre-Christmas victories, but North End welcomed back Ryan Ledson on the bench.
The game was tight in the first 14 minutes, with the first chance coming the way of the visitors as Josh Earl broke down the left, pulled the ball back from the byline for Sean Maguire, whose shot was blocked by Andre Wisdom, but only as far as Paul Gallagher on the edge of the box, his effort flying inches over the bar.
But the match changed on the 20-minute mark as referee Darren Bond went straight for his pocket and the red card when Waghorn was sent from the field for a studs up challenge on PNE skipper Alan Browne’s ankle, the match official having no choice.
Patience was then key against the ten-man Rams, with Gallagher pulling the strings from a deep position and he was involved in some of the best parts of the first half.
On 37 minutes, the No.12’s free kick, after Darnell Fisher was brought down by Colin Kazim-Richards, from the right corner of area, saw a lovely cross to the back post to Josh Earl, whose shot on the stretch was into the arms of Rams skipper David Marshall.
Shortly after, more good play saw a Johnson ball from the right and Earl headed back across goal towards Maguire, Matthew Clarke heading behind for one of many corners going PNE’s way in the opening period.
Six minutes into the second half and PNE were denied an opener by Marshall, as they broke with pace, Scott Sinclair going forward and then finding Maguire, who in turn sent it on to Barkhuizen, whose vicious shot on the run was pushed behind the for a corner by the stopper.
The chances continued and again Marshall was needed to deny Maguire after a break down the left, where he was threaded in behind the Derby defence by Daniel Johnson in a right-hand channel on 57 minutes.
A double change on the hour mark saw Jayden Stockley and former Rams man Emil Riis on for Darnell Fisher and Maguire, with a switch to 3-5-2, with Sinclair and Barkhuizen operating as wing backs; Tom Bayliss and Ryan Ledson following for Gallagher and Sinclair nine minutes later, and Josh Harrop for Barkhuizen the last of all five changes.
Only five minutes were added on after Kazim-Richards needed treatment late on, and seven substitutes were made between the two sides, but in the seventh minute of added on time, the Lilywhites finally won it and a stunning goal it was, too.
It was pressure on the right and skipper Browne picked up the ball in the right corner of the area and looked up before curling a brilliant effort over Marshall into the top left-hand corner of the goal, practically the last touch of the game, giving PNE their first win in the league at Pride Park since their first ever visit in 2002.
Derby County line-up: Marshall (c), Wisdom, Shinnie, Bielik, Jozwiak (Sibley, 85), Waghorn, Byrne, Kazim-Richards (Hector-Ingram, 90), Clarke, Buchanan, Knight. Subs not used: Roos, Forsyth, Bird, Ibe, Evans, Holmes, Watson.
PNE line-up: Rudd, Fisher (Stockley, 60), Earl, Browne (c), Huntington, Davies, Barkhuizen (Harrop, 82), Gallagher (Ledson, 69), Maguire (Riis, 60), Johnson, Sinclair (Bayliss, 69). Subs not used: Ripley, Storey, Rafferty, O’Reilly.
Referee: Mr D Bond