A late winner from substitute Matt Crooks gave Rotherham United the points after North End looked to have taken at least a point from the game when Ryan Ledson cancelled out Richard Wood’s opener with his first goal for the club.
Wood had given the home side the lead from close range eight minutes after half-time, but Ledson scored with ten minutes to go and the Lilywhites looked like the side who were going to go on to win, until the Millers broke away and Crooks won it for Paul Warne’s men with four minutes to go.
Alex Neil named an unchanged side to the side that defeated league leaders Reading just a few days before, whilst the hosts made half a dozen changes to their side.
But for the first 20 minutes, it was a game that didn’t settle, with a lot of long balls dealt with well by the North End backline, while the visitors' attacking unit was unable to get the intricacy they wanted around the opposition’s penalty area.
But they had the best chance of the first half on 25 minutes, when a long ball found Emil Riis, who held it up well and then slid it to the left to find the run of Daniel Johnson, who was in on goal, but his left-footed effort was well saved by Viktor Johansson on his debut in the Millers goal.
Another chance came ten minutes later, for Riis at the back post, after Johnson’s cross, following good work down the left by Scott Sinclair and Joe Rafferty, but the Dane couldn’t quite bring the ball under control to shoot.
The Millers' only real chance of the half came seven minutes before the break when Kyle Vassell had a free kick from 20 yards, Declan Rudd making an excellent two-handed save to push the well-hit effort away.
The home side started the second half with a good chance as Ben Wiles delivered from the left and Freddie Ladapo fired wide from six yards out.
But they had the lead on 53 minutes as a deep free-kick from Rotherham out on the right found Michael Ihiekwe at the back post, who headed it down for centre half partner Richard Wood, the captain firing home from inside the six-yard box.
Just before the hour mark, a double change saw Jayden Stockley and Tom Barkhuizen on for Riis and Sinclair as the Lilywhites looked to go with two new front men.
On 69 minutes, there was a strong shout for a PNE penalty when Stockley flicked the ball on for Barkhuizen to race in behind and he appeared to clip the ball past Johansson, only to be taken out, but referee Andy Davies saw nothing wrong.
Paul Gallagher needed to replace an injured Darnell Fisher with a quarter of an hour remaining, forcing skipper Alan Browne to drop in to right back.
But PNE drew level with ten minutes to go as Ryan Ledson grabbed his first goal for the club. It was a corner from Gallagher on the right that went deep and found the No.18 on the edge of the penalty area and he drilled the ball through a crowd of bodies and into the bottom left-hand corner of the goal.
However, the home side went back in front with a swift break with four minutes left. Substitute Matt Crooks was found by Florian Jozefzoon and he fired into the bottom left corner.
It was almost 2-2 within a minute as Gallagher’s ball from the left found Stockley’s head; he beat Johansson, but the ball came off the left-hand post and somehow fell to a red shirt to clear.
Seven minutes of stoppage time began with a superb cross-field ball from Gallagher finding Browne, whose low first time ball found Barkhuizen, but he couldn’t find the target from his low effort at goal and the home side held on for the win.
Rotherham United line-up: Johansson, Wood (c), Vassell (Crooks, 67), Wiles, Ladapo, Lindsay, Sadlier (Jozefzoon, 23), Harding, Ihiekwe, Olosunde (MacDonald, 89), Barlaser. Subs not used: Vickers, Hirst, Miller, Smith.
PNE line-up: Rudd, Fisher (Gallagher, 75), Rafferty, Ledson, Huntington, Storey, Sinclair (Barkhuizen, 59), Johnson, Riis (Stockley, 59), Browne, Potts. Subs not used: Ripley, Earl, Harrop, Maguire.
Referee: Mr A Davies